美文网首页
URi匹配判断

URi匹配判断

作者: 私人云笔记_骁勇波波 | 来源:发表于2023-05-25 14:46 被阅读0次

    //白名单uri直接放行

        String requestURI = request.getRequestURI();

        PathMatcher pathMatcher =  new AntPathMatcher();

        boolean needAuthen = false;

        for (String uriPattern : SecurityConfig.AUTH_WHITELIST) {

            boolean match = pathMatcher.match(uriPattern, requestURI);

            if (match) {

                return true;

            }

            continue;

        }

参考文章: https://www.jianshu.com/p/4f9ee6007213

相关文章

网友评论

      本文标题:URi匹配判断

      本文链接:https://www.haomeiwen.com/subject/wzshedtx.html