错误:嵌套事务中抛出异常,并且catch了异常后报错:Transaction rolled back because it has been marked as rollback-only.
解决方案:1、在catch中添加TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
2、不要catch;
错误:嵌套事务中抛出异常,并且catch了异常后报错:Transaction rolled back because it has been marked as rollback-only.
解决方案:1、在catch中添加TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
2、不要catch;
本文标题:Transaction rolled back because
本文链接:https://www.haomeiwen.com/subject/nvvcaltx.html
网友评论