下面的代码部分有误,仅供参考。当我执行更新时,发生RuntimeException异常,并且整个事务回滚。因此我需要省略RuntimeException并防止整个事务回滚。
<bean id="myService" parent="abstractService">
<property name="target">
<ref bean="_myService" />
</property>
<property name="proxyInterfaces">
<list>
<value>com.app.SysService</value>
</list>
</property>
<property name="transactionAttributes">
<props>
<prop key="update*">PROPAGATION_REQUIRES_NEW,-RuntimeException</prop>
<prop key="*">PROPAGATION_REQUIRED,-Exception</prop>
</props>
</property>
</bean>