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”

猜你喜欢

转载自www.cnblogs.com/caotao0918/p/11751394.html