美文网首页
Transaction rolled back because

Transaction rolled back because

作者: 爱的旋转体 | 来源:发表于2021-10-22 11:34 被阅读0次

    错误:嵌套事务中抛出异常,并且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