日期:2014-05-17 浏览次数:21328 次
<!-- 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>
推荐阅读更多>
-
关于myeclipse自动生成的index.jsp有关问题
-
哪个包有这个com.sun.org.apache.xerces.internal.dom.DocumentImpl?该怎么解决
-
关于深圳外包公司的一些观点!清大家也说说对深圳外包公司的看法!该如何解决
-
什么时候回收垃圾解决思路
-
cookie 被复制,这样的安全有关问题如何解决
-
用正则表达式如何匹配一个时有时无的字符串
-
关于验证码的分辨 有需要的朋友 或者做过的朋友来看看
-
jsf与struts,该怎么处理
-
javascript 执行,该如何处理
-
刚接触spring,有一点javaEE基础,推荐下学习资料解决方案
-
如何在网页下嵌入vlc播放器
-
页面不能显示数据,该怎么处理
-
关于Map取值有关问题
-
怎么理解在程序中调用另一个类的MAIN()方法
-
奇怪的servlet路径配置解决方案
-
sql语句:
-
会日语,懂应用类软件的人员请进!该怎么解决
-
怎么在displaytag中获取当前行的id,具体有关问题看下面
-
关于new Socket(hostname,port)的有关问题
-
!请教小弟我如何把从数据库中取出的图片文件显示在页面上