Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ResourceLoader delegation from ApplicationResourceLoader #42835

Closed
zmkpr0 opened this issue Oct 22, 2024 · 1 comment
Closed

Support ResourceLoader delegation from ApplicationResourceLoader #42835

zmkpr0 opened this issue Oct 22, 2024 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@zmkpr0
Copy link

zmkpr0 commented Oct 22, 2024

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 22, 2024
@philwebb philwebb self-assigned this Oct 22, 2024
@philwebb philwebb changed the title Support for additional ProtocolResolvers in JksSslStoreBundle Support ResourceLoader delegation from ApplicationResourceLoader when used with SSL bundles Oct 22, 2024
@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 22, 2024
@philwebb philwebb added this to the 3.x milestone Oct 22, 2024
@philwebb
Copy link
Member

I'm currently looking at #42468 and would like a way to have auto-configured SSL Bundles work with the classloader from the application context ResourceLoader. It seems like supporting delegation would be possible once that is fixed.

@philwebb philwebb modified the milestones: 3.x, 3.4.0-RC1 Oct 23, 2024
@philwebb philwebb changed the title Support ResourceLoader delegation from ApplicationResourceLoader when used with SSL bundles Support ResourceLoader delegation from ApplicationResourceLoader Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants