日期:2014-05-17 浏览次数:20967 次
<!-- 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>
推荐阅读更多>
-
求助:关于页面隐藏的有关问题
-
这段文本用JAVA如何提取
-
j2me在真机上的有关问题
-
springMVC 中静态资源的引述
-
请大伙儿指点迷津
-
Hibernate级联保存,父表为空,先存子表,保存提示外键为null的异常如何解决
-
关于数据类型的有关问题
-
求问怎么调用web service
-
大家给推荐个开发用的笔记本,多谢
-
document.all["line"].length的有关问题(感觉是javascript的bug)
-
J2ME能否进行串口编程?添加javax.comm包是否可以?解决思路
-
javascript 中查找特定字符有关问题
-
JSP视频与音频的实现解决方法
-
Chm电子书制作工具,那一款最方便优秀?该怎么解决
-
sun.net.ftp.FtpProtocolException: NLST :500 'NLST '
-
关于属性文件的有关问题?
-
乱码是否可以转换成中文,该如何解决
-
银联接口调用解决办法
-
今日喜得一侄女,大家帮起个名
-
怎么用j2se 弄界面开发呢