Spring MVC 返回JSON数据中文乱码问题解决

1.在controller中注解处设置参数

@RequestMapping(value="/save",produces="text/html;charset=UTF-8")

 

2.在返回值之前设

response.setCharacterEncoding("UTF-8");

 

posted @   xiaohongxin  阅读(203)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示