日期:2014-05-17 浏览次数:20980 次
<!-- 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中的移位操作
-
关于分页显示的想法解决方案
-
【很迷惑】webwork+spring的集成,xwork.xml文件里面配置action,class属性里面写bean的id和直接写类名,差别就这么大?哪位高手能讲讲明白
-
,小弟我重装了mysql后,系统报Connections could not be acquired from the underlying database
-
web.xml里设置session有效期不管用,该如何处理
-
问个linux部署java web项目有关问题
-
lucene 中的TermRangeQuery解决方案
-
忧闷的是用java这么久了,居然file.renameTo()方法没有成功一次
-
急大家看看!解决思路
-
java 读取串口数据,分两次读取了.请教是什么原因
-
学Java:什么时候合适开始看源代码
-
求eclipse窗口编程插件,该如何解决
-
mybatis怎么支持乐观锁
-
小弟我以字节的方式读入了一个8位的灰度索引图,请教小弟我如何在屏幕下显示出来
-
关于文件读写操作有关问题 50分
-
请问一个IREPORT报表的有关问题
-
JAVA Webservice有关疑问
-
eclipse 揭示 configure build path
-
jsp页面往一个封装类传值有关问题
-
小弟我想对集合对象里面的元素进行排序,运行时出现运算符 > 不能应用于 java.lang.Object,java.lang.Object