私は春に次のコードを持っています-
<tx:advice id="transactionAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" rollback-for="org.springframework.dao.DataAccessException" no-rollback-for="java.lang.IndexOutOfBoundsException"
timeout="30" />
</tx:attributes>
</tx:advice>
この構成は、DataAccessException
およびそのすべてのサブ例外に対してロールバックします。つまり、例外階層がロールバックされます。ただし、(同じ階層に属していない)一連の例外をロールバックできるようにしたい。-のようなものを書くことは可能ですか?
<tx:advice id="transactionAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*" propagation="REQUIRED" rollback-for="org.springframework.*" no-rollback-for="java.lang.*"
timeout="30" />
</tx:attributes>
</tx:advice>
上記のコードを試しましたが、機能しません。