spring responsebody 返回中文乱码 财富值10

2016-09-26 08:08发布

@RequestMapping(value = "getJSON", method = RequestMethod.GET,produces={"text/html;charset=UTF-8;","application/json;"} )     @ResponseBody     public String getJson(HttpServletRequest request,HttpServletResponse response){          response.setCharacterEncoding("UTF-8");                  return "说到底";              }

前台
.ajax({

       type: "GET",        url: "getJSON.do",        success: function(data){            console.log(data);                  }    网上说加produces=“ { }”    加了还是乱码。
友情提示: 问题已经关闭,关闭后问题禁止继续编辑,回答。