日期:2014-05-17 浏览次数:21090 次
<!-- 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>
推荐阅读更多>
-
Ajax框架相关有关问题
-
if实现话语
-
json转换遍历有关问题(菜鸟)
-
Java面试题求解,该如何解决
-
【100分】【】Spring+ibatis+ehcache MethodCacheInterceptor的invoke方法没有执行
-
今天使用<html:messages>出现奇怪异常,大家进来帮帮忙
-
怎么将一个页面通过servlet传送到另外一个页面
-
关于遍历ArrayList的有关问题
-
求各位大神帮忙,怎么使用HQL获取序列
-
郁闷,《spring技术手册》林信良-博文视点这本书光盘无法读取!解决思路
-
关于timer的有关问题
-
js 正则表达式 运用变量
-
(笔记)J2EE中怎么运用Autoboxing/Unboxing-New Features of J2EE
-
怎么写程序实现DB2大字段数据转移到Oracle中,不用ETL等数据转移工具
-
set集合有关问题,帮忙解答上,多谢
-
屡次请求服务器后,无响应
-
困难有关问题请问,怎么自己在的系统中实现执行自定义脚本的功能
-
struts2和spring的小疑点
-
关于数组转入list集合删除连续重复的有关问题
-
:文本框内容怎样根据下拉列表框自动显示