From 6b6acb4f91f7dcd3ba03652e7546ff06b0b58a28 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期二, 23 四月 2024 02:42:47 +0800 Subject: [PATCH] 功能调整 --- framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java b/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java index 2018aef..ea9b1c3 100644 --- a/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java +++ b/framework/src/main/java/com/yuanchu/mom/config/PowerConfig.java @@ -30,6 +30,9 @@ @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if(handler instanceof HandlerMethod) { + if(request.getRequestURL().toString().contains("/error") || request.getRequestURL().toString().contains("/outPath")){ + return HandlerInterceptor.super.preHandle(request, response, handler); + } HandlerMethod h = (HandlerMethod)handler; ValueAuth annotation = h.getMethodAnnotation(ValueAuth.class); if(annotation!=null){ @@ -38,7 +41,6 @@ JSONObject obj = JSONUtil.parseObj(new Jwt().readJWT(request.getHeader("token")).get("data")); Integer userId = Integer.parseInt(obj.get("id") + ""); int i = authMapper.isPower(userId, h.getMethod().getName()); - if (i == 0){ throw new ErrorException(obj.get("name") + " 鏃犳潈闄愯闂� " + h.getMethod().getName() + " 鎺ュ彛"); } -- Gitblit v1.9.3