日期:2014-05-17 浏览次数:20785 次
<!-- 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>
![]()
推荐阅读更多>
- 请问 怎样读取打包文件jar 中的声音文件
- @Service注脚失效
- 跪求啊找到Int;需要int[];该如何处理
- 相对Vector,ArrayList在什么的情况下会因异步出现有关问题
- 恒量池解析中的直接引用是什么
- 语法贴 int x=my[0] 是x引用数组0角标还是数组0角标赋值给x
- iso8859-1 转 utf-8的有关问题
- 多次重复提交表单出现异常?其他一切正常?tomcat提示:
- springMVC+JPA整合,数据库方言有关问题
- running runnable小疑点
- 小弟我在一个项目中使用了不定值的JProgressBar,但是飞行的速度太快了,求指导怎样才能减速
- 请问spring @Service怎么加Parent进行事物控制的有关问题,请不吝赐教
- JSP中的plugin动作元素有关问题
- 项目经理最主要的技能应该是技术还是管理?解决思路
- java中的疑难有关问题
- java函数到底是不是按值传参啊要命了解决办法
- 主题:javascript生成的树形目录怎么把读取的id传递给jsp页面
- Java Web项目怎么加下License
- 超初学者的有关问题
- 网页显示解决方法