Skip searching of nonexistent directory in PathMatchingResourcePatternResolver
#31111
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Affects: 6.0.11
Hello, we perform resource scanning on several locations with this code.
So we search for all resources in the JAR files in
packages/all/**
and (optionally) in the filesystem folderconfig/packages/all/**
.With the update from Spring Boot 2.7 to 3.0 we will get the warning in the console.
As in my use case, this location is really optional. I don't like to present that warning to the user ;), as the warning will show up in the log file analysis.
The change was introduced with
4419d56#diff-69e11ca5877c77cb766565b03d43386f382f5321c62017d9e92f3615f6b3183eR762
I want to ask, if you think that it would make sense to check if
rootPath
really exists beforeStream<Path> files = Files.walk(rootPath)
is called and log this scenario not as warning but rather atINFO
level -- for example,INFO: Skipping search in nonexistent directory [%s] for files matching pattern [%s]
.Roland
The text was updated successfully, but these errors were encountered: