Skip to content

PathMatchingResourcePatternResolver cannot search for "classpath*" patterns in a jar file roots [SPR-12095] #16711

@spring-projects-issues

Description

@spring-projects-issues

Phil Webb opened SPR-12095 and commented

When using the PathMatchingResourcePatternResolver against a standard URLClassLoader patterns of the form classpath*:somefile*.properties will not pick up resources from JAR files.

This is due to findAllClassPathResources calling ClassLoader.getResources("") which unfortunately doesn't seem to include JAR URLs in the result.

Spring Boot encountered this issue and created a workaround in commit eb721b1e which might be generally applicable.


Affects: 4.0.6

Reference URL: spring-projects/spring-boot#1378

Issue Links:

Referenced from: commits spring-projects/spring-boot@650e326

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions