@transactional 是干嘛的
时间: 2023-11-21 11:54:34 浏览: 64
后端 Java Spring Data Jpa @Transactional 介绍
5星 · 资源好评率100%
@Transaction是一个注解,可以应用于接口、类和方法上。当应用于类时,表示该类的所有public方法都会使用相同的事务属性信息。当应用于方法时,方法的事务属性会覆盖类的事务配置信息。不推荐将该注解应用于接口上,因为在使用Spring AOP和CGLib动态代理的情况下,会导致该注解失效。@Transactional注解的属性之一是propagation属性,它指定了事务的传播行为。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [@Transactional](https://blog.csdn.net/seven_xjj/article/details/120100704)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *3* [@Transactional 详解](https://blog.csdn.net/u011314442/article/details/84397366)[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^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文