日期:2014-05-17 浏览次数:21195 次
<!-- 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>
推荐阅读更多>
-
it.sauronsoftware.ftp4j.FTPException [code=550,message= /DLL:Permission denied,该怎么处理
-
小弟我又只剩10分了 问个初级swing有关问题
-
@@@@@@@@@@大家好,小弟有个有关问题请问
-
jsp頁面打開時跳出另存頁面的對話框,請教高手原因,如何解決
-
frameset里嵌套frameset,该如何解决
-
在线解决方法
-
安装tomcat-7.0.22遇到有关问题,
-
请来帮忙!下拉框的有关问题
-
WS-I: (BP2402) The wsdl:binding element does not use a soapbind:binding,该如何处理
-
红帽中国首席架构师马阅和你讲Jboss 正在进行中,大家快来看啊该怎么解决
-
JAVA新手,寻求帮助!为了中国软件业的崛起,请各位大大 帮帮小弟我
-
jsp的一个小有关问题
-
javascript 怎么获取文件上传对话框中的全路径名
-
控件的自动创建有关问题
-
jsp的变量为啥不可以作为js函数的参数
-
while条件中不能定义变量吗?解决思路
-
ssh框架整合难点解决办法
-
求推荐习题项目,巩固struts2和hibernate
-
***请教在java中,怎么使用RMI实现类似于.net remoting的远程事件***
-
怎么html跳转action中的一个方法