smart-sso
smart-sso copied to clipboard
ClientFilter过滤问题
可以把excludeList.contains(httpRequest.getServletPath()) 替换成下面的方式 这样的话,就可以使用/api/** 的方式过滤一组了,下面的代码参考spring-webmvc的 org.springframework.web.servlet.handler.MappedInterceptor#matches
private PathMatcher pathMatcher = new AntPathMatcher();
private boolean hasMatch(String path){
for (String exclude : excludeList) {
if(pathMatcher.match(exclude,path)){
return true;
}
}
return false;
}
非常棒的建议,👍