springboot + mybatis plus 使用事务
springboot使用事务需要引入sprint-tx,但是在结合mybatisplus时,mybatis-plus已经代为引入了在springboot的启动类或者某个@Configuration上加上@EnableTransactionManagent开启事务的支持(这个@EnableTransactionManagent是否必须添加,因为我没有添加也可以使用事务,这是为什么呢?是必须加的,但是spring-boot会自动装配,所以我们不用必须手动添加,但是springboot必须添加)在..
原创
2021-06-18 09:08:33 ·
1227 阅读 ·
1 评论