<tx:advice id="serviceAdvice">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" rollback-for="java.lang.Exception"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="servicePointcut" expression="execution(* cn.iwoo.service.*.*(..))"/>
<aop:advisor pointcut-ref="servicePointcut" advice-ref="serviceAdvice"/>
</aop:config>
spring的通用事务管理机制
最新推荐文章于 2024-02-06 21:59:26 发布