方式1: 在spring-mvc.xml文件中加入一下配置 方式2: 使用fastjson.jar 格式化代码, 在Controller层中的请求返回值类型改为String
图2-7 返回类型 方式3: 使用fastjson-1.2.66.jar 在Result类中,加JsonFormat注解
本文来自博客园,作者:所遇所思,转载请注明原文链接:https://www.cnblogs.com/mynxg/p/17989290