日期:2014-05-17 浏览次数:21367 次
<!-- 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>
推荐阅读更多>
-
struts.xml配置有关问题,有经验的人帮忙看看
-
问个数据库的变动即时反馈给用户的有关问题
-
小弟我登陆CSDN后,清除小弟我IE的缓存。然后在按F5刷新。为什么为要重新登录啊小弟我并没有清除CSDN服务器的SESSION会话啊
-
项目导入失败,该怎么解决
-
关于一个MD5加密的有关问题
-
请问 sql server中delete语句的有关问题
-
后台报错java.lang.IllegalArgumentException: No bean specified,该如何处理
-
请教几个菜鸟有关问题,散分
-
poi处理Excel内存溢出,谢谢各位
-
jsp页面表格导出excel解决思路
-
HashTableMap是不是java系统类啊该如何解决
-
不知道卫什么import后边报错
-
dwr页面掏出list循环显示在table中
-
mysql数据库乱码!该如何处理
-
关于批量创建数据库有关问题
-
org.springframework.jdbc.BadSqlGrammarException: Bad SQL
-
快速排序时一个很奇怪的堆栈溢出有关问题
-
frame内元素跳出框架有关问题
-
sturts1+Spring+Hibernate+Oracle运行出错解决思路
-
关于Java的一个自定义抛处错误有关问题