소스 검색

fix jwt过滤编写问题

疯狂的狮子li 3 년 전
부모
커밋
4a8781f4d9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ruoyi-framework/src/main/java/com/ruoyi/framework/security/filter/JwtAuthenticationTokenFilter.java

+ 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;