浏览代码

fix jwt过滤编写问题

疯狂的狮子li 3 年之前
父节点
当前提交
4a8781f4d9

+ 1 - 1
ruoyi-framework/src/main/java/com/ruoyi/framework/security/filter/JwtAuthenticationTokenFilter.java

@@ -40,8 +40,8 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter
     {
         // 匿名路径放行 默认拦截
         boolean flag = true;
+        PathMatcher pm = new AntPathMatcher();
         for (String anonymou : securityProperties.getAnonymous()) {
-            PathMatcher pm = new AntPathMatcher();
             if (pm.match(anonymou, request.getRequestURI())) {
                 flag = false;
                 break;