异常信息:
1 | org.hibernate.LazyInitializationException: could not initialize proxy - no Session |
解决方式:
1、在配置文件web.xml中加入如下配置:
1 | <filter> |
2、在hibernate属性中添加:hibernate.enable_lazy_load_no_trans
如下:
1 | <prop key="hibernate.enable_lazy_load_no_trans">true</prop> |