过滤器filter_通过response返回JSON数据
2018-11-26 本文已影响0人
特_尼
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
PrintWriter out = response.getWriter();
JSONObject res = new JSONObject();
res.put("msg", "错误");
res.put("success", "false");
out.append(res.toString());
参考文章:https://blog.csdn.net/u012201619/article/details/75156707/