日期:2014-05-17 浏览次数:21432 次
<!-- 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>
推荐阅读更多>
-
踩鸟,大神求解!解决方案
-
form表单提交的解决方法
-
POI 导入Excel 提醒LeftoverDataException求帮助
-
weblogic发布有关问题
-
获得任务管理器应用程序列表里面的任务名解决方案
-
出现HTTP Status 500 - 异常是咋回事
-
列出时间的代码解决思路
-
想问下关于jquery+ajax上传多个附件,该怎么解决
-
kindeditor在下传图片是和struts2冲突,哪位高手知道如何解决啊求求求求求求求求求求求求求求求求求求。
-
在action中弹出js对话框的有关问题
-
判断用户登录,空值异常
-
小弟我使用dtree.js 生成树形目录,可是当单击节点时,怎么获得节点的信息
-
Jcom.dll是否支持64位操作系统
-
今日面试不会 郁闷啊
-
[生手求教]在JAVA ee中不自动导入包
-
抽象方法与抽象类,该怎么处理
-
关于网站上统计在线人数的有关问题,头疼的有关问题
-
难道杀鸡非要用牛刀?该怎么解决
-
java基础有关问题,java 方法为什么要覆写,在子类中重新写个方法不就好了吗
-
关于Swing中重启功能的实现,还请好手支招