摘要:
在Spring boot中,有些情况会使@Transactional不生效 1、@Transactional 注解需要放在 public 方法上才会生效。如果方法不是 public,事务可能不会按预期工作。 2、如果方法不是由 Spring 容器管理的 bean,那么 @Transactional 阅读全文
posted @ 2024-04-16 10:26 草妖 阅读(7) 评论(0) 推荐(0)
|
|||
摘要:
在Spring boot中,有些情况会使@Transactional不生效 1、@Transactional 注解需要放在 public 方法上才会生效。如果方法不是 public,事务可能不会按预期工作。 2、如果方法不是由 Spring 容器管理的 bean,那么 @Transactional 阅读全文
posted @ 2024-04-16 10:26 草妖 阅读(7) 评论(0) 推荐(0) |
|||