日期:2014-05-17 浏览次数:21369 次
<!-- 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>
推荐阅读更多>
-
properties文件应该放在什么位置?该如何解决
-
red5 录像和播放有关问题
-
[]小弟我想做Java Web编程,对于Java网络编程需要了解到什么程度
-
:javabean的有关问题,谁能帮我看看呀?(特急)
-
■■急■■~解密有关问题,用.net加密的密文,用java来解密,个人估计是 BASE64 加密方式.
-
域名注册和虚拟机代理解决思路
-
怎么将double中的那些0去掉
-
寻Java Web程序员兼职开发网站解决方案
-
怎么从1个MIDLET 调用另外1个MIDLET
-
不同浏览器的css有关问题
-
JDBC相关的有关问题
-
怎么把多条选上的复选框数据保存到数据库
-
com.mysql.jdbc.PacketTooBigException:
-
一个关于.jsp和.do文件的简单有关问题
-
,MyEclipse8.5 无法创建webproject
-
【】各位大神好,小弟请问一个有关问题,js取jsp页面表格的记录拼成json
-
测试与开发解决方法
-
如何学好java程序设计啊
-
小弟我弄了三个小时未解决,望高手帮小弟我下
-
字符串查找替换有关问题