<bean id="myHibTxManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="myHibTxManager">
<tx:attributes>
<tx:method name="get*" propagation="SUPPORTS" read-only="true" />
<tx:method name="load*" propagation="SUPPORTS" read-only="true" />
<tx:method name="search*" propagation="SUPPORTS" read-only="true" />
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes >
</tx:advice>
<aop:config>
<aop:pointcut id="serviceMethods"
expression="execution(* com.accp.team0.biz.*.*(..))" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods" />
</aop:config>
spring声明试事物
最新推荐文章于 2024-10-18 18:43:38 发布
173万+

被折叠的 条评论
为什么被折叠?



