-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support module path scanning for "classpath*:" resource prefix
Prior to this commit, searching for classpath resources using the "classpath*:" resource prefix did not find all applicable resources for applications deployed as modules -- for example, when test classes and resources are patched into the application module automatically by Maven Surefire. This affected component scanning -- for example, via [@]ComponentScan -- and PathMatchingResourcePatternResolver.getResources(String) in general. This commit addresses this by introducing first-class support for scanning the module path when PathMatchingResourcePatternResolver's getResources(String) method is invoked with a location pattern using the "classpath*:" resource prefix. Specifically, getResources(String) first searches all modules in the boot layer, excluding system modules. It then searches the classpath using the existing Classloader-based algorithm and returns the combined results. Closes gh-28506
- Loading branch information
Showing
2 changed files
with
127 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters