List of usage examples for org.springframework.util PathMatcher match
boolean match(String pattern, String path);
From source file:org.springframework.js.resource.ResourceServlet.java
private boolean matchesCompressedMimeTypes(String mimeType) { PathMatcher pathMatcher = new AntPathMatcher(); for (String compressedMimeType : compressedMimeTypes) { if (pathMatcher.match(compressedMimeType, mimeType)) { return true; }// www . j ava2s .co m } return false; }
From source file:org.springframework.js.resource.ResourceServlet.java
private boolean isAllowed(String resourcePath) { if (resourcePath.matches(protectedPath)) { return false; }/*www .j a va2 s . co m*/ PathMatcher pathMatcher = new AntPathMatcher(); for (String pattern : allowedResourcePaths) { if (pathMatcher.match(pattern, resourcePath)) { return true; } } return false; }