2
spring 事务问题
source link: https://www.v2ex.com/t/813324
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
两个 Service A 的方法 A 没有加 @Transactional 和 Service B ;
Service A 的方法 A 没有加 @Transactional ;
Service B 的方法 B 添加 @Transactional ;
方法 A 调用方法 B ,方法 B 出错,抛出全局异常,
为什么会去回滚到 controller 里,再执行一次。
相当于 B 抛出全局异常后, 这个接口执行了两遍
第 1 条附言 · 2 天前
两个 Service A 和 Service B ;
第一句
第一句
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK