@Transactional 可以加到哪里
时间: 2023-10-15 18:24:38 浏览: 72
Spring声明式事务@Transactional知识点分享
@Transactional可以作用在接口、类、类方法上。 但需要注意的是,如果@Transactional注解标注在非public修饰的方法上,它将会失效。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [@Transactional详解](https://blog.csdn.net/qq_38584262/article/details/129337441)[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_2"}}] [.reference_item style="max-width: 50%"]
- *2* [@Transactional注解加不加 rollbackFor = Exception.class 的区别和@Transactional 注解失效的3种原因及...](https://blog.csdn.net/guoqi_666/article/details/126505719)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文