HttpServletResponse httpServletResponse = (HttpServletResponse) response;
httpServletResponse.setContentType("text/html; charset=UTF-8");
PrintWriter writer;
httpServletResponse.setStatus(400);
writer= httpServletResponse.getWriter();
writer.println("{\n \"status\":\"400\", ");
writer.println(" \"message\":\"토큰이 유효하지 않습니다 >.< !!! \"\n}");
writer.flush();
return;
Question PrintWriter를 통한 Filter에서의 예외 처리