You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Of course
At 2021-01-18 09:54:22, "brothelul" <[email protected]> wrote:
I want to solve it If there's no one.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Issue Description
Type: bug report or feature request
Describe what happened (or what feature you want)
url只能精准匹配
if(authFilterExcludeUrls.contains(servletPath)) {
chain.doFilter(request, response);
return;
}
Describe what you expected to happen
// Exclude the urls which needn't auth
for (String authFilterExcludeUrl : authFilterExcludeUrls) {
if (isMatch(authFilterExcludeUrl, servletPath)) {
chain.doFilter(request, response);
return;
}
}
// 判断url是否与规则配置: ? 表示单个字符; * 表示一层路径内的任意字符串,不可跨层级; ** 表示任意层路径;
public Boolean isMatch(String pattern, String url) {
AntPathMatcher matcher = new AntPathMatcher();
return matcher.match(pattern, url);
}
private static final AntPathMatcher PATH_MATCHER = new AntPathMatcher();
if (authFilterExcludeUrls.stream().anyMatch(s -> PATH_MATCHER.match(s, servletPath))) {
chain.doFilter(request, response);
return;
}
How to reproduce it (as minimally and precisely as possible)
Tell us your environment
master
Anything else we need to know?
The text was updated successfully, but these errors were encountered: