异常信息:org.springframework.dao.InvalidDataAccessApiUsageException:No EntityManager with actual transactionavailable for current thread - cannot reliably process ‘persist’ call;
解决方案:原因就是需要在开启事务的方法上没有开启事务,然后只需要在需要开启事务的方法上面加上@Transactional注解即可解决
【已解决】No EntityManager with actual transaction available for current thread
最新推荐文章于 2023-07-22 15:25:04 发布