日期:2014-05-17 浏览次数:21223 次
<!-- 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>
推荐阅读更多>
-
小弟我的数组如何引用不了
-
java正则表达式截取字符的有关问题
-
实现一个统计网站访问量的效能
-
请教下面的倒计时怎样实现(必须用div"显示的"内容作为倒计时初始值,怎么实现)
-
SSH框架整合启动提示如上异常
-
java线程池解决方法
-
使用maven构建项目,项目上有红叉提示异常,但是异常找不到
-
j2me连接servlet数据接收不到,该怎么解决
-
easyui与spring,structs结合的有关问题
-
一个基础有关问题,想不通,请问一下大家
-
POST与GET-Struts解决方案
-
【散分】【转】你退学就能成为世界首富?解决思路
-
哪位高手有javamail.jar,activation.jar包
-
求个下如何从access数据库中读取图片显示在jsp页面
-
hibernate使用NamingStrategy动态配置表的有关问题
-
关于FCKeditor的浏览服务器功能!解决思路
-
300分!给一个数组 求里面出现次数最多的元素和其次数 另:需要加上时间复杂度,否则只给5分。最优算法给100分,该怎么处理
-
初学者有关问题<<<<<<<<<学习Spring的时候要一个.XML文件。在ECLIPSE如何找的啊小弟我如何死活的就找不到啊气死了啊>>>>>>>>
-
Java 关于paintComponent与paint有什么区别?各自的特征
-
[color=#FF0000]急请教怎么打开.m4c格式的视频文件[/color]