启动类中加入
@Beanpublic OpenEntityManagerInViewFilter openEntityManagerInViewFilter(){ return new OpenEntityManagerInViewFilter();} 配置文件中加入 spring.jpa.open-in-view=true 参考
解决Spring Data JPA延迟加载no session错误 http://blog.csdn.net/chrislyl/article/details/54630413
时间: 2025-01-10 00:14:06