Skip to content

Introduce getResources() method in ResourceLoader interface #26443

@nightswimmings

Description

@nightswimmings

I would like to suggest as new feature the possibility to add a getResources() method to the ResourceLoader interface, and if it accepted wildcards it would be even nicer. I assume there must be a rationale to prevent this, but just in case.

I don't understand why the out-of-the-box auto-configured ResourceLoader implementation is not prepared for these needs.

It seems to me, from my ignorance, that 90% of the apps would benefit from having a single central ResourceLoader that deals with all kinds of resources.

Currently I cannot have an @Autowired ResourceLoader, not even override it because I have to manually deal with concrete implementation PathMatchingResourcePatternResolver.

Thanks mates!

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions