错误原因:
内层事务抛出异常标记回滚,外层事务catch了异常以后没有抛出。
解决方法:
在外层事务的代码里往外抛出去或者手动回滚。
手动回滚:TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
错误原因:
内层事务抛出异常标记回滚,外层事务catch了异常以后没有抛出。
解决方法:
在外层事务的代码里往外抛出去或者手动回滚。
手动回滚:TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();