@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=“ { }” 加了还是乱码。
付费偷看金额在0.1-10元之间
一周热门 更多>