日期:2014-05-17 浏览次数:20919 次
<!-- 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中的全选有关问题
- 初学者有关问题,大侠
- 那個伺服器好點,tomcat,jboss,weblogci,该如何处理
- 关于lucene 搜索,该如何处理
- JTextArea换行之后,行间距的设置有关问题
- JAVA ME学习,第一个JAVA ME程序-电筒
- 用socket做一个C/S模型传输文件解决方法
- java中Double类数字太大,怎么让它直接显示而不要用科学计数法
- 100分于高手关于获取三级机构的有关问题 解决有关问题马上结帖
- 做了一个聊天的客户端,关于线程的有关问题。
- 关于Applet初始化的有关问题,init()方法写了,为什么还说没有初始化
- is org.hibernate.MappingException: Association references unmapped class: org.
- 求大神见见这是用的什么技术
- hibernate多对多保存(中间表不更新),该如何处理
- 找工作,顺便送分解决办法
- 有没有基于Strust2的OA或人力资源方面的源代码下载解决方案
- Java反照,Int和Integet类型设置不成功,String可以设置
- 对于业务层和持久层的疑问,该如何解决
- java 象棋程序的一个小疑点,希望大家帮解决一下啊多谢
- 【翻译】面试英语自小弟我介绍