日期:2014-05-17 浏览次数:21038 次
<!-- 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>
推荐阅读更多>
-
〓〓〓JSP的读取数据类-怎么将记录集转为二维数组返回
-
请来看看
-
JAVA中如何把小弟我的数据流关上
-
散分,想问一下子大家采用什么ajax框架 开发系统,为什么
-
com.sun.image.codec.jpeg.JPEGImageEncoder在JDK API文档里吗?如何看的
-
jsp表单清空,该如何解决
-
要做个手机游戏,跑车的,像跑跑,QQ飞车那样的,求意见,建议。(继续加分)解决方案
-
JSP新手有关问题求下
-
老实说,大家写的简历中,工作经验部分都如实反映吗,假如有出入,不怕被查吗解决思路
-
JavaScript操作用友华表cell插件,该怎么处理
-
求一程序算法,相信CSDN上高手如云。解决办法
-
至于向上转型的疑问
-
上面是JSP项目中,hibernate技术中的一个代码,帮忙说说这个代码是做什么用的
-
用java实现单纯形法最优解,该怎么处理
-
JS中的onClick()不跳转解决方案
-
纳闷:MDIP20的amr声音播放
-
点击图片变为另一张图片的实现解决方法
-
jxl写excel关于小数的有关问题
-
集成接口里iterator()的方法是如何实现的
-
关于Spring的一个小疑点