Skip to content

Support ResourceLoader delegation from ApplicationResourceLoader #42835

@zmkpr0

Description

@zmkpr0

Is there a reason that JksSslStoreBundle creates a new instance of ApplicationResourceLoader instead of using an existing DefaultResourceLoader?

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/ssl/jks/JksSslStoreBundle.java

Resource resource = new ApplicationResourceLoader().getResource(location);

Creating a new ApplicationResourceLoader instance means that for example S3ProtocolResolver from Spring Cloud AWS that works by registering itself using ResourceLoaderAware is ignored and only those declared in spring.factories get picked.

I know there are a few ways to work around this, but it's not that obvious that not all ProtocolResolvers work when declaring a bundle.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions