org.springframework.transaction.UnexpectedRollbackException: Transaction silently rolled back because it has been marked as rollback-only
时间: 2023-08-19 09:06:19 浏览: 170
Spring 3.x企业应用开发实战.pdf
引用\[1\]和\[2\]中提到了报错信息"org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only"。这个异常通常是由于事务被标记为只能回滚而导致的。引用\[3\]中的代码片段显示了在Spring的事务管理器中,存在一个全局标记,用于在参与的事务失败后将现有事务标记为只能回滚。这意味着当一个参与的事务失败时,整个事务将被回滚。这个异常通常是由于在事务参与过程中发生了错误,导致事务被标记为只能回滚而引发的。
#### 引用[.reference_title]
- *1* *3* [Spring事务:UnexpectedRollbackException:](https://blog.csdn.net/sdonoman11/article/details/106103686)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [Spring事务UnexpectedRollbackException异常抛出原因深度分析及解决方案](https://blog.csdn.net/reggergdsg/article/details/105143283)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文