JPA删除接口报错 : org.hibernate.LazyInitializationException: failed to lazily initialize a collection, could not initialize proxy - no Session

原因:

1.加事务注解   @Transactional

import org.springframework.transaction.annotation.Transactional;

2.方法必须是public修饰

posted @ 2020-03-26 10:57  Peter.Jones  阅读(369)  评论(0编辑  收藏  举报