日期:2014-05-17 浏览次数:21069 次
<!-- 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>
推荐阅读更多>
-
哪位高手有Jfreechar 的开发文档
-
有哪位高手知道c#中numericUpDown这个控件在java里面是哪个控件
-
求去掉-的java代码?解决思路
-
求解释,这段代码输出结果是?该怎么解决
-
Integer.parseInt()抛错误?
-
急jsp+Tomcat5.0+mysql4.122配置的服务器如何总是报错
-
接口跟抽象类的作用 请详细说明。
-
关于SSH整合的有关问题
-
多条件查询,该如何处理
-
一个小小的跳出循环有关问题,请问一上,
-
运用servlet向数据库SQLServer2000添加数据出现异常
-
SSL联接LDAP出错
-
怎样根据服务器返回的值,改变下拉列表的默认选择项,该怎么处理
-
请教ORACLE中,system,sys,root,sysdba,这4种用户的默认密码是什么,如果忘记了怎么找到他们,小弟我现在就忘记了,可小弟我都不知道如何找到。谢
-
!学习Spring的有关问题
-
小弟我想求出结果集的记录数,哪个方法好
-
Java SE 7 API 英文版 CHM格式,该如何解决
-
求教一个关于jmf的DataSource类的有关问题
-
用javamail写一个带正文和图片的发送邮件,在网上拷贝了代码,发现出一下异常,咋回事
-
执行deleteRow()之后结果集被关闭?解决方案