com.googlecode.jsonplugin.JSONException: java.lang.reflect.InvocationTargetException解决方法

原因:出现这种情况是在使用json-plugin时,一些不需要串行化的属性被序列化了 比如spring 注入的 services生成了getter、序列化ID生成了getter等等 ,json plugin会把有getter方法的属性序列化,格式化为json串 。

 

 解决办法:1、可以去掉getter或者在getter上加上@JSON(serialize=false)

                2 、去掉不需要的getter

你可能感兴趣的:(com.googlecode.jsonplugin.JSONException: java.lang.reflect.InvocationTargetException解决方法)