Class PropertyFileScanner
java.lang.Object
com.patbaumgartner.spring.migrator.core.PropertyFileScanner
Finds the configuration files a migration should look at.
Rather than walking the whole project and filtering afterwards, the scanner derives the
directories it needs to visit from the literal prefix of each include pattern. A
default run therefore touches only src/main/resources and
src/test/resources instead of descending into .git, target or
node_modules.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe files a scan found, together with anything that stopped it from looking. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default patterns, covering Spring Boot's conventional configuration file locations for main and test resources.Scans a project for files matching the given glob patterns.
-
Method Details
-
scan
Scans a project for files matching the given glob patterns.- Parameters:
rootDir- the project root that patterns are relative toincludes- glob patterns relative to the project root- Returns:
- the matching files and any directories that could not be read
-
defaultIncludes
Returns the default patterns, covering Spring Boot's conventional configuration file locations for main and test resources.- Returns:
- the default include patterns
-