Skip to content

Improve @PropertySource loading support [SPR-12116] #16732

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

Closed
spring-projects-issues opened this issue Aug 24, 2014 · 2 comments
Closed

Improve @PropertySource loading support [SPR-12116] #16732

spring-projects-issues opened this issue Aug 24, 2014 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Aug 24, 2014

Marten Deinum opened SPR-12116 and commented

Recently we need to add support to load properties from a database and make those available to the Environment. Although not that hard (we used an ApplicationContextInitializer and added some PropertySources) it still requires some knowledge of the Spring Framework infrastructure.

Would it be possible to introdudce a loader attribute on the @PropertySource annotation in which you could specify a PropertySourcesLoader which in turn contains the strategy for loading that particuliar property source. The code from ConfigurationClassParser could load/instantiate this loader and delegate loading to it. A default implementation containing the current loading strategy could be added.

This would also allow for easier loading of for instance yaml, xml or json files.


Issue Links:

2 votes, 5 watchers

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Feb 29, 2016

Sam Brannen commented

Resolving as a Duplicate of #13603.

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Mar 1, 2016

Juergen Hoeller commented

Since this is somewhat complementary in terms of the use cases presented in #13603, I'm marking this as fixed along with it... just in case there are any follow-ups or refinements.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants