日期:2014-05-17 浏览次数:20729 次
<!-- 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>
![]()
推荐阅读更多>
- 怎么保证添加图片而不覆盖原有图片
- 在 struts2 中怎么集成velocity
- 请问一个再js中时间延迟有关问题
- 刨根问底:接口和类的效率有关问题
- Eclipse plugin/RCP开发资料大整理
- 小弟我们爱分享 - Spring事务管理
- oracle连接有关问题
- Servlet源程序编译出错?该怎么处理
- Java nio实现socket通信遇到的有关问题
- 字符串截取的有关问题,希望大家进来看一下
- 关于字符串处理的若干有关问题!
- 关于clone步骤
- 居然还有牛人这一说。
- 为何在eclipse上编的java程序不能在控制台下运行
- 字符串算法
- strut2拦截器,页面传值传不到靠山,请高手帮忙,下面为代码!
- java ee,该怎么处理
- apache 配置有关问题
- org.apache.commons.fileupload.FileUploadException: Processing
- FCKeditor3.6.2的使用方法,该如何处理