SqlSession [xxx] was not registered for synchronization because DataSource is not transactional

问题:
mybatis-plus使用报错:

需要在目标方法上添加@Transactional注解,将事务交给spring管理

SqlSession [xxx] was not registered for synchronization because DataSource is not transactional_第1张图片

结果如下:

你可能感兴趣的:(Bug,mybatis,spring,java)