????//白名單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;
? ? ? ? }
參考文章:?http://www.itdecent.cn/p/4f9ee6007213