日期:2014-05-17 浏览次数:21040 次
<!-- 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>
推荐阅读更多>
-
请教在学过C的基础上是应该先学数据结构和算法,还是先学c++或JAVA呢
-
DES加密有关问题
-
怎么反编译jfreechart的demo
-
xStream转javaBean,该怎么处理
-
在jsp中连接mysql的有关问题
-
tag标签中文有关问题
-
关于信息分栏显示的有关问题
-
上传war包到新浪云(SAE),打开页面显示的是war包的目录(详情见图片),咋回事
-
JSP项目中怎样对html:select进行JS取值?该怎么解决
-
问各位大牛一个有关问题-(分不够,后加)
-
java ftp 服务器如何实现
-
循环 想一个panel中添加多个按钮出错。 很简单的小程序, 求解解决办法
-
实在是小弟我的错,那么激动,把人弄错了,向jajavava道歉
-
tomcat出错: Unexpected end of file from server,该如何解决
-
java实现ping命令,该如何处理
-
吐了,java Timer 终止不了。
-
向左走(J2EE)向右走(Andorid)如果是您(前辈!)你选哪一个?解决方法
-
JPA到底是神马?解决方案
-
java jni调用winAPI解决思路
-
el 表达式 里 equals 与==的差异