package com.kidgrow.zuul.exception; /** * @author liuke * @description 网关认证异常处理,记录日志 * @date 2019/11/25 */ //@Slf4j //public class JsonAuthenticationEntryPoint implements AuthenticationEntryPoint { // private AccessLogService accessLogService; // // public JsonAuthenticationEntryPoint(AccessLogService accessLogService) { // this.accessLogService = accessLogService; // } // // @Override // public void commence(HttpServletRequest request, HttpServletResponse response, // AuthenticationException exception) throws IOException, ServletException { // ResultBody resultBody = GlobalExceptionHandler.resolveException(exception,request.getRequestURI()); // response.setStatus(resultBody.getHttpStatus()); // // 保存日志 // accessLogService.sendLog(request, response,exception); // WebUtils.writeJson(response, resultBody); // } //}