日期:2014-05-17 浏览次数:20841 次
<!-- 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>
![]()
推荐阅读更多>
- xmlHttp传送参数的有关问题
- JFreeChart 生成雷达图(急)解决思路
- CKEDITOR 如何实现自定义按钮添加html代码
- Tomcat5517是不是一个不稳定的软件服务器?解决方案
- 们帮小弟我看看这个JPanel为什么显示出来
- J2SM有关问题
- 小弟我想做一个图片放大的效果
- 为何把关闭资源放finally中, 放在try-catch之后不可以么
- 在MyEclipse中怎么看库函数的源代码
- 留心观察好多网站应用的图片都有自己的戳?解决方法
- jsp/javaBean读写文件的路径有关问题
- 用pagertaglib进行条件分页解决办法
- 继承有关问题
- struts2图片上传预览,该如何解决
- 为什么会出现 org.apache.jasper.JasperException: No data found解决方案
- String replaceAll 转义符替换的有关问题
- 关于用JDBC连接sql server2005的有关问题希望大家给解决一下吧
- 为什么数组上标(index)只能为int不能为long
- 权限控制矩阵,该如何解决
- 总结J2SE