日期:2014-05-17 浏览次数:20777 次
<!-- 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>
![]()
推荐阅读更多>
- java面试题,给一组域名排序解决方案
- 关于在Java中怎么使用Template技术的有关问题
- 怎么把html代码存到数据库里
- jsp在处理mysql字段中字串截取有关问题
- 关于邮费计算解决方法
- Spring 加入 OpenSessionInViewInterceptor出现空指针解决方法
- java List toString()后如何还原
- 想学java,请推荐本经典的书 最好英文版解决办法
- Struts的初学者有关问题
- 如何统计从数据库里取出的数据条数
- java联接SQLSERVER2008
- java中UTF8转GBK,该如何处理
- 哪位高手帮小弟我看下这个程序,说小弟我没重写方法,但是小弟我确实是API复制的啊
- 急为什么小弟我的tomcat 5.5 不能解析jsp
- 使用paint的一点小疑点
- 尚学堂BBS2007疑问解答解决方法
- 创建对象放在步骤里面/外面,或者方法for里面/外面,有什么区别
- servlet如何配置,更具体点是web-xml如何配置
- 版主,有CSDN,有点有关问题,进来看看是不是就小弟我自己出现这种情况
- 哪位高手能告诉小弟我一个DJ java decompiler的上载地址