可能是因为在配置事务传播特性的时候,将这种操作配置为了readOnly
<!-- 事务的传播特性 -->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED"/>
<tx:method name="del*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="*" read-only="true"/>
</tx:attributes>
</tx:advice>
本文介绍如何正确配置事务的传播特性,特别是在将某些方法配置为readOnly时需要注意的问题。通过示例展示了如何使用tx:advice来定义不同的事务行为。
510

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



