SpringMVC 返回 json 字符串中文乱码

原文链接:https://blog.csdn.net/wenteryan/article/details/79803691

 

在RequestMapping使用(produces = “text/html; charset=utf-8”)produces 作用根据请求头中的Accept进行匹配,如请求头“Accept:text/html”时即可匹配。

如果类型是:application/json ,设置为:produces = “application/json; charset=utf-8”

posted @ 2019-10-28 11:55  caotao0918  阅读(210)  评论(0编辑  收藏  举报