报错信息:
Caused by: org.hibernate.TransientObjectException: Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session.
at org.hibernate.proxy.AbstractLazyInitializer.errorIfReadOnlySettingNotAvailable(AbstractLazyInitializer.java:256)
at org.hibernate.proxy.AbstractLazyInitializer.isReadOnly(AbstractLazyInitializer.java:269)
... 95 more
解决方法:将实体属性添加lazy=”false”(默认是true)即时加载。问题解决。