JSONObject.fromObject(hibernate对象)
出现以下Exception
解决方法如下
出现以下Exception
net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
net.sf.json.JSONObject._fromBean(JSONObject.java:959)
detaiMessage:Positioned Update not supported.
解决方法如下
JsonConfig jsonConfig=new JsonConfig();
jsonConfig.setExcludes(new String[]{"handler","hibernateLazyInitializer"});
JSONObject.fromObject(hibernate对象,jsonConfig);