当前位置:首页 > Web开发 > 正文

org.hibernate.LazyInitializationException: could not initia

2024-03-31 Web开发

标签:

错误现象:

org.hibernate.LazyInitializationException: could not initialize proxy [com.angus.entity.ProductCategory#1] - no Session



解决方法

在出问题的实体类上加@Proxy(lazy = false)



原因

hibernate默认是懒加载的。

org.hibernate.LazyInitializationException: could not initialize proxy [com.angus.entity.ProductCateg

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/32949.html