we often use "PROPAGATION_REQUIRED" to config our transaction.
but if there throw an exception ,the transaction will not rollback as we expect.
so,we should add a special code in the configuration file to resolve this problem.
the code below:
"PROPAGATION_REQUIRED,-Exception"
本文讨论了在使用PROPAGATION_REQUIRED配置事务时遇到的问题,即抛出异常时事务未按预期回滚。为解决这一问题,文中提出了一种方法:在配置文件中添加特定代码,确保在指定类型的异常被抛出时能够触发事务回滚。
2252

被折叠的 条评论
为什么被折叠?



