@Transactional注解加到啥位置
时间: 2023-10-17 22:35:49 浏览: 104
@Transactional注解可以加到方法或类上。当加到方法上时,表示该方法需要进行事务管理。当加到类上时,表示该类中的所有方法都需要进行事务管理。根据需要,可以根据具体情况选择将@Transactional注解加到方法或类上。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [@Transactional注解超详细](https://blog.csdn.net/weixin_45490198/article/details/131320526)[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* *3* [@Transactional注解](https://blog.csdn.net/qq_50560491/article/details/124026870)[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 ]
阅读全文