日期:2014-05-17 浏览次数:20814 次
<!-- 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:useBean怎么取集合中的数据来自动填充?
- 知道客户端图片路径,不需要点击,没有任何操作的情况下怎么将一张图片上传
- 初学者求指导 小弟我只学了C和数据结构 能自学JAVA吗
- ASP与JAVA兼容性有多少?该怎么处理
- 请问分号的作用
- 看完Head First Design Pattern后,回头看GoF的Design Patterns仍是很头疼
- org.apache.jasper.JasperException: Unable to compile class for JSP解决方案
- String转换成long[]数组后,调用dao失败解决办法
- 一次悲剧的面试经历,该如何处理
- 请分析一下这段JDNI方面的程序解决思路
- 百分求简单网页有关问题(火急)
- 上了一个人家写好的程序.如何打开?
- 看下是什么有关问题
- 关于java解压缩类Inflater的性能有关问题
- web工程login时提示空指针错误
- javase代码有错,哪位高手能调试
- 新手初学者,配置SSH出现的有关问题,跪求大牛们给小弟指点一二
- java webservice如何用soap传递XML对象,求代码
- 各位大神,请问上上图的数据如何获取