在SpringMVC Controller中返回 json 数据出现乱码问题,因为没有进行编码,只需要简单的注解就可以了
在 @RequestMapping()中加入produces=“text/html;charset=UTF-8”属性即可
如下:SpringMVC 映射路径 设置编码,格式
@RequestMapping(value = "/exceptionInfo",produces={"text/html;charset=UTF-8"})

在SpringMVC Controller中返回 json 数据出现乱码问题,因为没有进行编码,只需要简单的注解就可以了
在 @RequestMapping()中加入produces=“text/html;charset=UTF-8”属性即可
如下:SpringMVC 映射路径 设置编码,格式
@RequestMapping(value = "/exceptionInfo",produces={"text/html;charset=UTF-8"})