解决方式:
对多集合数据懒加载问题,排除掉关联集合数据转换 json
添加一个注解 @JSON(serialize = false) 在实体类中的集合的get方法上添加 即可 要是maven工程 最后记得install
role: cn.qcc.bos.domain.take_delivery.Order.workBills, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:563)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded
(AbstractPersistentCollection.java:205)at org.hibernate.collection.internal.AbstractPersistentCollection.initialize
(AbstractPersistentCollection.java:542)at org.hibernate.collection.internal.AbstractPersistentCollection.read
(AbstractPersistentCollection.java:133)at org.hibernate.collection.internal.PersistentSet.equals(PersistentSet.java:423)
at java.util.Vector.indexOf(Vector.java:404)
at java.util.Vector.contains(Vector.java:363)
at org.apache.struts2.json.JSONWriter.value(JSONWriter.java:117)
at org.apache.struts2.json.JSONWriter.add(JSONWriter.java:401)
at org.apache.struts2.json.JSONWriter.bean(JSONWriter.java:231)
... 74 more