JPA - no Session 的解决办法

老大夫 发布于 2022-05-10 16:21
原因: 出现 - no Session 是因为hibernate需要事务 解决方法: 我们在方法上添加注解 @Transaction @Rollback(false) 这个是在测试类中防止回滚用的