SSH+JSON时遇到的问题
发布时间:2020-12-16 19:27:01 所属栏目:百科 来源:网络整理
导读:问题描述 org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter
问题描述 org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: org.apache.struts2.json.JSONException: java.lang.IllegalAccessException: Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.interceptor.ExposeInvocationInterceptor$1 with modifiers "public" 在网上搜索了很多关于这个问题的解决方式 基本上分为2类 1个是在相应的get方法上面加上注解 例如: @JSON(name='名称') 2个就是去掉注入service的get 方法 此处去掉get方法时需要注意,可能这个get方法并不是你目前使用的这个变量的get方法,有可能是其他变量的get方法所影响,因此删除的时候需要注意你删除的这个变量是否在其他地方使用到过。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |