日期:2014-05-17 浏览次数:21405 次
<!-- 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>
推荐阅读更多>
-
破圈法的证明 看不懂 求讲解 多谢 考试题
-
泛型类?解决方法
-
验证码途径正确,却无法正确显示,提示内容非法
-
关于uploadify批量插件与非IE内核浏览器的有关问题?望高手指教一二!
-
如何保持jsessionId 不变
-
【求解一题java面试题】,解决方案
-
数据库设计的有关问题!小弟我想建一个用户表,该如何弄啊
-
GSON解析JSON数据解决思路
-
新手!JAVA中继承有关问题!
-
学习javaWed开发学习内容解决办法
-
Struts2中怎么传递表单中的数据
-
待:为什么在小弟我本地(TOMCAT)上面没有有关问题,但部署在WebSphere却报这种异常啊
-
话说大伙写小站点都是用什么样的结构
-
J2ME 十分棒的文章推荐
-
HTTP Status 500 - 异常,待
-
问个数学几何题可以吗?该怎么处理
-
容易的js效果实现不了。
-
SSH框架中 当返回的结果集为Object时jsp页面怎么取值
-
看不懂,哪位高手能帮小弟我解释一下下面的语句什么意思
-
struts2 拦截器 和session 的存取有关问题