日期:2014-05-17 浏览次数:20958 次
<!-- 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>
推荐阅读更多>
-
关于easy ui 1.3.2 在IE6下加载datagird数据时有什么优化方法么,该怎么解决
-
们一个java算法有关问题
-
jquery读单选框有关问题
-
Java双向链表的实现,帮忙看下有没有什么bug。解决思路
-
大家说实话,面试有关问题
-
struts2+jquery+ajax的校验例子,最最最简单即可
-
————紧急CAS单点登录,退出之后用ticket参数访问抛出错误~ 求解决~
-
SSH使用注解方式出错误 求教
-
用smartupload上传文件时死机解决思路
-
小弟我在run方法里面加入一个设置守护线程的语句 为何报错
-
JAVA中怎么使用抽象类?让小弟我困惑的有关问题,麻烦知道的朋友帮小弟我解释下
-
读取本文部分数据变为byte数组,怎么防止字符被拆开
-
Swing中的组件 JEditorPane 与 JTextPane有什么区别啊 。该怎么处理
-
response.sendRedirect页面传值参数缺失?不知道如何调整
-
java 正则表达式轮换img src地址
-
请教兄弟们这个SQL如何写
-
怎么控制所有Session
-
in thread "main " java.lang.ClassFormatError:
-
预备学习J2ME-Polish
-
急struts项目中引用iframe的一个有关问题,高手帮帮忙啊