forked from kidgrow-microservices-platform

克 刘
2020-03-16 549148d90d41a3320bd36d469fd690354c78de58
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 JsonAccessDeniedHandler implements AccessDeniedHandler {
//    private AccessLogService accessLogService;
//
//    public JsonAccessDeniedHandler(AccessLogService accessLogService) {
//        this.accessLogService = accessLogService;
//    }
//
//
//    @Override
//    public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException exception) throws IOException, ServletException {
//        ResultBody resultBody = GlobalExceptionHandler.resolveException(exception,request.getRequestURI());
//        response.setStatus(resultBody.getHttpStatus());
//        // 保存日志
//        accessLogService.sendLog(request, response,exception);
//        WebUtils.writeJson(response, resultBody);
//    }
//}