日期:2014-05-17 浏览次数:20952 次
<!-- 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>
推荐阅读更多>
-
发一段CompareTo 方法的例子,其中很有意思的一段输出,大家看看,都代表了什么?解决办法
-
static与Singleton,该怎么解决
-
线程池如何让主线程知道所有子线程已经执行完成
-
向oracle中存储BigDecimal数据类型的异常
-
JSONObject一个方法有关问题
-
苦逼 软件工程师的开始 。 。
-
什么是学习JavaApplet的有效方法解决方案
-
java 正则表达式校验,该怎么解决
-
非常有深度的有关问题,绝对高手来看看,中
-
多选框更新有关问题。
-
上传文件,存到另一台服务器上如何弄?
-
一个至于枚举类型的程序
-
有关问题求助!各位大哥帮忙
-
关于applet上的一个有关问题~~~~~~~~~~~~~~~~~~~~~~~~
-
java页面中显示excel,但数字是以科学计数法显示解决办法
-
哪位大哥帮看看这个异常是那错了?java.net.BindException: Address already in use: connect到主机 的 TCP/IP 连接失败
-
java rfid 开发,该怎么处理
-
在公司里做开发,神马东东都给你封装好了,你只要调用一下就行了。解决办法
-
初学者来了->怎么将收到的数据显示在窗口内
-
关于dom4j处置转义字符