Transactional回滚
时间: 2023-10-12 11:06:31 浏览: 84
@Transactional注解可以用来标记方法或类,在方法上添加注解时,如果方法抛出异常,事务会进行回滚。在默认情况下,@Transactional注解只对RuntimeException及其子类的异常进行回滚,而对于checked异常,默认不会回滚。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [@Transactional注解作用,不生效的场景,事务回滚](https://blog.csdn.net/guorui_java/article/details/130181559)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Spring中@Transactional事务回滚](https://blog.csdn.net/xiaojin21cen/article/details/83507174)[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^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文