日期:2014-05-17 浏览次数:20845 次
<!-- TransactionManager --> <bean id="hibTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <tx:advice id="txAdvice" transaction-manager="hibTransactionManager"> <tx:attributes> <tx:method name="add*" propagation="REQUIRED" /> <tx:method name="del*" propagation="REQUIRED" /> <tx:method name="update*" propagation="REQUIRED" /> <tx:method name="select*" propagation="REQUIRED"/> <tx:method name="search*" propagation="REQUIRED"/> <tx:method name="insert*" propagation="REQUIRED" /> <tx:method name="do*" propagation="REQUIRED" /> <tx:method name="*" propagation="SUPPORTS" read-only="true" /> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut expression="execution(* biz.*.*(..))" id="bizMethods" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" /> </aop:config> <!-- ********************************我是很长的分割线******************************** --> <!-- Dao --> <bean id="petDiaryDao" class="dao.impl.hib.PetDiaryDaoHibImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean id="petInfoDao" class="dao.impl.hib.PetInfoDaoHibImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <!-- ********************************我是很长的分割线******************************** --> <!-- Biz --> <bean id="petDiaryBizTarget" class="biz.impl.PetDiaryBizImpl"> <property name="petDiaryDao" ref="petDiaryDao" /> </bean> <bean id="petInfoBizTarget" class="impl.PetInfoBizImpl"> <property name="petInfoDao" ref="petInfoDao" /> </bean> <!-- ********************************我是很长的分割线******************************** --> <!-- Advice --> <bean id="lotteryAdvice" class="advice.LotteryAdvice"> <property name="petInfoBiz" ref="petInfoBizTarget" /> </bean> <bean id="petInfoBiz" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="proxyInterfaces" value="biz.PetInfoBiz" /> <property name="interceptorNames" value="lotteryAdvice" /> <property name="target" ref="petInfoBizTarget" /> </bean> <bean id="petDiaryBiz" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="ProxyInterfaces" value="biz.PetDiaryBiz" /> <property name="interceptorNames" value="lotteryAdvice" /> <property name="target" ref="petDiaryBizTarget" /> </bean>
![]()
推荐阅读更多>
- JSP加载flash读取不了同目录上的xml文件
- 求运用WSDL生成WebService的方法
- java.lang.UnsupportedOperationException: no ApplicationFilterChain
- java程序员寻机构
- struts2 struts.xml中配置action执行后跳到另一个action不起作用解决方案
- 哪位高手有好看点的 textbox ,label ,button 的CSS 阿
- 刚才百度的在线笔试题,大家看看,该如何处理
- 这个java下令什么意思:java -jar -Xms2048m -Xmx2048m OtaUpdateServer.jar ~/OTA/
- 关于xfire+spring开发webservice的一个异常
- 使用struts2上载文件
- hibernate 高手来帮忙看一下,关于继承映射之后的查询有关问题
- 泛型相关的有关问题
- 嵌套的页面如何获取后台传过来的lis值
- Exception creating bean of class org.apache.struts.action.DynaActionForm: {1}解决方案
- 怎么取出文本中与正则表达式匹配的字符串
- FreeMarker中对“!”的误报异常,如何破?
- 页面里的在线实时聊天如何实现
- 实在让人很生气
- 新人,提问:在java与C++中while与for到底有什么区别希望高手给我举个例子,书上说的小弟我看不懂
- 在eclipse的控制台中的光标定位有关问题