mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
19b436c6aa
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