JPA No EntityManager with actual transaction available for current thread

原因是在删除操作上没有添加事务管理。

解决方法:

在对应的@Service或组件上添加@Transactional即可

posted @ 2021-07-30 10:40  还可入梦  阅读(75)  评论(0编辑  收藏  举报