日期:2014-05-17 浏览次数:21314 次
<!-- 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>
推荐阅读更多>
-
jsp怎么调用mysql,并返回给JSP?多谢~
-
Java多线程啊
-
哪位高手能帮小弟我看上这段代码哪有有关问题,如何改正啊
-
web程序的数据库操作语句有关问题
-
新手有关问题 高手请帮忙
-
如果谁帮小弟我解决了这个有关问题小弟我100分相送.若觉得办法可行就先送你20分,有关问题解决后立即送另外80分
-
eclipse不能建立jsp文件
-
分割大文本文件的程序,不能正常输出,请各位大神指教,该怎么处理
-
中秋节,散分!祝大家愉快!该如何处理
-
有关eWebEditor在线编辑器有关问题
-
啊java.lang.ClassCastException
-
Java从入门到精通读书笔记(连载)—c++软件工程师学java
-
关于J2ME中的时间取得解决思路
-
关于一个正则表达式的有关问题
-
struts2表单标签迷惑
-
Cannot find bean * in any scope(高分),该怎么处理
-
SSH 筹建的项目上线后总喜欢宕机
-
==和equals的区别具体解释!解决方法
-
如何用window.location.href上载文件
-
myeclipse可以导入自己安装的jdk 那javaee的包如何导入呢