forked from kidgrow-microservices-platform

克 刘
2020-03-31 13883507228e344c870ab26da2c6b744d495b2a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
//    }
//}