From 2932a0988430827facfcbc1772dacd2e28776f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E5=AD=90=E6=9D=8E=C2=B7De?= Date: Wed, 13 Apr 2022 17:40:32 +0800 Subject: [PATCH] Update TokenFilter.java --- .../anjiplus/template/gaea/business/filter/TokenFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java index 7411d5e7..fa1251b9 100644 --- a/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java +++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/filter/TokenFilter.java @@ -127,11 +127,11 @@ public class TokenFilter implements Filter { //判断接口权限 //请求路径 - String requestUrl = request.getRequestURI(); + //String requestUrl = request.getRequestURI(); requestUrl中可能会有contextpath,而底层扫描的controller是没有的 String servletPath = request.getServletPath(); String methodValue = request.getMethod(); //请求方法+#+请求路径 - String urlKey = methodValue + GaeaConstant.URL_SPLIT + requestUrl; + String urlKey = methodValue + GaeaConstant.URL_SPLIT + servletPath; GaeaUserDto gaeaUserDto = JSONObject.parseObject(gaeaUserJsonStr, GaeaUserDto.class); List authorities = gaeaUserDto.getAuthorities();