spring aop中的<tx:advice> 一般应用于事务管理
例如:
例如:
<aop:config>
<aop:advisor id="managerTx" pointcut="execution(* cn.ccb.bccb..*.bs.impl.*.*(..))" advice-ref="txAdvice" order="2" />
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true" />
<tx:method name="find*" read-only="true" />
<tx:method name="query*" read-only="true" />
<tx:method name="sendBccbFund*" propagation="REQUIRES_NEW" />
<tx:method name="saveDccSerialForIn" propagation="REQUIRES_NEW" />
<tx:method name="getDayendDate" propagation="REQUIRES_NEW" />
<tx:method name="getCanExecuteForAuto" propagation="REQUIRES_NEW" />
<tx:method name="getCanExecuteForManual" propagation="REQUIRES_NEW" />
<tx:method name="execClearPreOrder" propagation="REQUIRES_NEW" />
<tx:method name="execMarkBreachOfContract" propagation="REQUIRES_NEW" />
<tx:method name="execCollectBranchFee" propagation="REQUIRES_NEW" />
<tx:method name="execByhtFund" propagation="REQUIRES_NEW" />
</tx:attributes>
</tx:advice>
Spring AOP 事务管理配置
本文介绍如何使用 Spring AOP 进行事务管理配置,通过具体的 XML 配置示例,展示了如何针对不同的方法应用不同的事务传播行为。
490

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



