使用了try-catch捕获了异常,事务不发生回滚,取消try-catch
或者在catch中手动回滚,加入:
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
使用了try-catch捕获了异常,事务不发生回滚,取消try-catch
或者在catch中手动回滚,加入:
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();