日期:2014-05-17 浏览次数:21101 次
<!-- 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>
推荐阅读更多>
-
java学到什么程度 就可以弄JSP servlet 和SSH 什么的
-
高手请听题:错误提示中的路径a.b.Class与a/b/Class 有什么不同
-
饱经5年的锤炼总结的JAVA全套视频100G
-
大家帮小弟我看看这是什么有关问题
-
使用jspsmartupload组件得到上传参数的值如何总是空
-
关于jdbc连接数据库报错:Couldn't get connection because we are at maximum connection。该如何解决
-
java怎么过滤自定义关键词
-
怎么能让生成jsp文件的同时生成与其内容一样的html文件
-
Java调用AppleScript,该如何解决
-
同时拿到了淘宝跟点点的offer,该如何选啊
-
求当当网代码解决方案
-
J2SE 关于JPanel的页面跳转有关问题
-
假期结束,散分,顺便给个基础面试题。解决办法
-
能否用JSP写一个在服务器端访问其他网站的asp文件,返回asp执行后的结果?该如何处理
-
myeclipse中安装spket提示JQuery解决方法
-
帮小弟我看下代码,很简单的~
-
在开发中遇到一个字符编码的有关问题,请老手指点
-
真是搞不懂了,关于Iterator的有关问题
-
jsp传table的值到servlet的有关问题 J神
-
编译失败 与 运行时抛出错误