文章列表
SpringMVC4+JPA+Hibernate4,设置fetch = FetchType.LAZY后,
报错:org.hibernate.LazyInitializationException: could not initialize proxy - no Session
我不想设置为 fetch = FetchType.EAGER,如何设置fetch = FetchType.LAZY,成功加载所需要的数据?
配置文件如下:
web.xml
------------------------------------------------------------------------- ...