Skip to content

Commit 0af9b3a

Browse files
committed
Update spring-transaction.md
1 parent 63244b8 commit 0af9b3a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/system-design/framework/spring/spring-transaction.md

+2
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,8 @@ private void method1() {
684684
1. `@Transactional` 注解只有作用到 public 方法上事务才生效,不推荐在接口上使用;
685685
2. 避免同一个类中调用 `@Transactional` 注解的方法,这样会导致事务失效;
686686
3. 正确的设置 `@Transactional``rollbackFor``propagation` 属性,否则事务可能会回滚失败;
687+
3.`@Transactional` 注解的方法所在的类必须被 Spring 管理,否则不生效;
688+
3. 底层使用的数据库必须支持事务机制,否则不生效;
687689
4. ......
688690

689691
## 4. Reference

0 commit comments

Comments
 (0)