/**标签:拦截器,preHandle,res,接口,权限,response,out From: https://www.cnblogs.com/hjwbkcom/p/16924220.html
* 响应信息
*
* @param response 返回信息
*/
public static void response(HttpServletResponse response) {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
PrintWriter out;
try {
JSONObject res = new JSONObject();
res.put("code", 401);
res.put("message", "访问无权限");
out = response.getWriter();
out.append(res.toString());
} catch (Exception e) {
e.printStackTrace();
}
}