日期:2014-05-17 浏览次数:21097 次
<!-- 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.servlet.jsp没有找到
-
【】网上的代码报错 传智播客BBS
-
急求calendar年历控件,大神们,给个下载地址
-
请教java控制台程序的变量如何赋值呀
-
cookie自动登录,没法删除
-
JSP编译异常!快来
-
JAVA中可不可以重新设定数组大小
-
JSF里的表如何引用CSS
-
听说tomcat不太稳定?解决方案
-
提早祝大家中秋节快乐!散分~~~
-
在写项目的时候遇到一个奇怪的乱码有关问题,求
-
itbatis保存数据出错: Unhandled Exception thrown: class org.springframework.jdbc.Uncate,该怎么解决
-
大家帮小弟我看看小弟我的简历啊绝望了
-
关于for循环的一个小疑点
-
java执行linux命令,该如何解决
-
Struts2标签有关问题 。
-
有关问题很简单,form表单提交给Action后,返回页面是一个JSP,怎么在返回页面的URL中带一个参数
-
咋回事?如何都找不出来!可就是有异常
-
showModalDialog传radio框的值,该如何处理
-
jsp有两个表单时 为什么 js方法会报错,应该怎么处理