ソースを参照

fix jwt过滤编写问题

疯狂的狮子li 3 年 前
コミット
36f8eb71f3

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

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