fix jwt过滤编写问题
This commit is contained in:
parent
36f8eb71f3
commit
bff9d0560d
@ -39,14 +39,13 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter
|
|||||||
throws ServletException, IOException
|
throws ServletException, IOException
|
||||||
{
|
{
|
||||||
// 匿名路径放行 默认拦截
|
// 匿名路径放行 默认拦截
|
||||||
boolean flag = false;
|
boolean flag = true;
|
||||||
for (String anonymou : securityProperties.getAnonymous()) {
|
for (String anonymou : securityProperties.getAnonymous()) {
|
||||||
PathMatcher pm = new AntPathMatcher();
|
PathMatcher pm = new AntPathMatcher();
|
||||||
if (pm.matchStart(anonymou, request.getRequestURI())) {
|
if (pm.match(anonymou, request.getRequestURI())) {
|
||||||
flag = true;
|
flag = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (flag) {
|
if (flag) {
|
||||||
LoginUser loginUser = tokenService.getLoginUser(request);
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user