| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private RequestMatcher processingMatcher; |
| | | |
| | | public SkipPathRequestMatcher(List<String> pathsToSkip, String processingPath) { |
| | | Assert.notNull(pathsToSkip); |
| | | pathsToSkip = Optional.of(pathsToSkip) |
| | | .orElseThrow(()-> new NullPointerException("In Method SkipPathRequestMatcher,Param pathsToSkip can't be null.")); |
| | | List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList()); |
| | | matchers = new OrRequestMatcher(m); |
| | | processingMatcher = new AntPathRequestMatcher(processingPath); |