spring aop中的<tx:advice>

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>

猜你喜欢

转载自63938525.iteye.com/blog/1056588
今日推荐