Skip to content

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

Closed

Description

@spring-projects-issues

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

Activity

  1. spring-projects-issues commented on Feb 29, 2016

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Resolving as a Duplicate of #13603.

  2. spring-projects-issues commented on Mar 1, 2016

    @spring-projects-issues
    CollaboratorAuthor

    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

  3. added
    type: enhancement
    in: core
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions