日期:2014-05-17 浏览次数:20996 次
<!-- 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>
推荐阅读更多>
-
js兑现弹出窗口
-
最近初学java…不知道java现在是什么行情?大家讨论下…该如何处理
-
window.location.href="跳转页面"在IE跟谷歌浏览器不能同时执行
-
java Scanner有关问题
-
,关于jquery datepicker日期控件的有关问题
-
struts1报jasper异常,TLD文件读取有有关问题
-
小弟我自己写的一个SQL语句,大家看看错在哪
-
JPA多对一双向关联保存有关问题
-
在页面写的,大家伙儿帮忙看看对不对
-
JSP的JavaBean应当放在哪个目录
-
JSF构架中,在JSP页加载资源包?
-
急请各位工作了的朋友介绍下,该如何处理
-
java.lang.OutOfMemoryError: GC overhead limit exceeded
-
关于PreparedStatement中的getParameterMetaData()失误,需要大侠帮助
-
高手来看看这是什么错误!
-
嵌套Array有关问题 和 split方法
-
将读取流中的数据存到字节数组中,该如何解决
-
散分了!做了一个站,北京的朋友进来帮小弟我顶一下啊内容小弟我相信大家会感兴趣的
-
有有关问题 望帮忙解决! 刚才发错代码了
-
java 怎样将大量的图片添加到面板上,该如何解决