Positioned Update not supported

来源:互联网 发布:centos 网卡uuid 编辑:程序博客网 时间:2024/05/18 02:28
太常见的问题了,
该异常有两种解决方法:
第一:在struts.xml文件的配置中排除不要被JSON序列化的属性,例如:

<action name="functions" class="getFunctionsAction" method="functions_getList">
                    <result type="json">
                     <param name="excludeProperties">functionsService</param>
                    </result>
            </action>


其中functionsService就是不要被JSON序列化的属性。
第二:在Action文件中去除不要被JSON序列化的属性的get()方法,例如:

public IFunctionsService getFunctionsService() {
                return functionsService;
        }


这样做functionsService同样不会被JSON序列化。

说明:
带有transient修饰符与没有Getter方法的字段(field)都不会被串行化为JSON。
不行就新建个action即可解决。
原创粉丝点击