Restore directory matching (explicitly excluding root path itself)
Closes gh-29333
This commit is contained in:
@@ -781,8 +781,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
|
||||
rootDir += "/";
|
||||
}
|
||||
|
||||
Path rootPathForPattern = rootPath;
|
||||
String resourcePattern = rootDir + StringUtils.cleanPath(subPattern);
|
||||
Predicate<Path> isMatchingFile = path -> (Files.isRegularFile(path) &&
|
||||
Predicate<Path> isMatchingFile = path -> (!path.equals(rootPathForPattern) &&
|
||||
getPathMatcher().match(resourcePattern, StringUtils.cleanPath(path.toString())));
|
||||
|
||||
if (logger.isTraceEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user