トランザクションに関する私の春の定義は次のように定義されています。
<bean id="txInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager"/>
</bean>
<aop:config>
<aop:pointcut id="defaultServiceOperation"
expression="execution(* x.y.service.*Service.*(..))"/>
<aop:advisor pointcut-ref="defaultServiceOperation"
advice-ref="defaultTxAdvice"/>
</aop:config>
<tx:advice id="defaultTxAdvice">
<tx:attributes>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
ここで、トランザクション インターセプターが呼び出されるたびに実行される、アプリケーションに含まれるインターセプターをいくつか追加したいと思います。つまり、ポイントカット 'defaultServiceOperation' に他のアドバイスを追加するか、'defaultTxAdvice' プリ インターセプターに追加したいと考えています。何かのようなもの:
<property name="preInterceptors">
<list>
<ref bean="optimisticLockingInterceptor"/>
<ref bean="deadLockingInterceptor"/>
</list>
</property>
それは可能ですか、どうすればできますか?