日期:2014-05-17 浏览次数:21203 次
<!-- 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>
推荐阅读更多>
-
为什么小弟我用createImage却打不开文件
-
oracel安装时出现的异常
-
shh整合 找不到spring找不到struts传递来的action
-
在Struts2中,透过如下语句获取真实路径,为何会得到一个如此奇怪的结果
-
MySQL数据库非空字段设置默认值的有关问题
-
多线程访问缓存的有关问题?
-
领导不用小弟我,小弟我想多干活多学习多挣钱。小弟我本将心向明月,奈何明月照沟渠
-
简单编程题,一时想不出了。解决方案
-
tomcat启动时监测数据库连接解决方法
-
问个java线程的小疑点
-
求获取客户端真实IP的代码解决思路
-
校验时间有关问题
-
若依报错throws java.lang.ClassFormatError accessible: module java.base does not “opens java.lang“
-
JAVA的类为什么可以没有成员变量的定义?初学者提问
-
解释一上这段代码的执行过程,考察for语句和静态函数
-
关于JAVA停车场管理中的小疑点请大神们给个思路~
-
servlet 读取文件路径有关问题
-
cxf+spring课程中的疑问
-
怎样写一个循环使每次循环出来的都是四位数例如0001,0002解决方案
-
J2ME 改变字体大小,该怎么处理