日期:2014-05-17 浏览次数:20929 次
<!-- 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>
推荐阅读更多>
-
当按键按下时Canvas的KeyPressed()方法没有调用该如何解决
-
eclipse 使用 javabean 出错,该如何处理
-
ASP+JS处理复杂表单的生成与验证[2]解决思路
-
java返回值的有关问题
-
搞清楚了一个有关问题,sf
-
用JSP做个网站,在本机访问的时候总是提示小弟我Unauthorized,咋回事情
-
学了很多天jsp了,连最简单的java自定义标签都没学会啊解决思路
-
请问java基础有关问题
-
关于垃圾回收,怎么理解。请各位大大指教
-
HELP!如何实现绘图中图象的移动?
-
请问一个关于Java抛出错误有关问题,
-
关于swing在圆桌面编程中的重要性
-
jre的精简有关问题
-
用Dom4j读取一段Xml字符串的有关问题(加急)
-
软件开发的工作八月份是淡季吗?那什么时候是旺季呢
-
无意发现一个servlet有关问题,百思不得其解,怪哉.怪哉.怪哉.
-
各位,ImageIO.read时报错,如何才能读取这图片文件
-
新手刚学网页制作JAVASCRIPT如何学
-
Apache + Tomcat + windows集群跟均衡负载
-
Struts2和Jfreechart的有关问题,要实现在页面中返回柱状图,结果一启动tomcat报了居多错