Skip to content

Allow default values to be specified for System properties in ResourceEditor [SPR-4622] #9299

@spring-projects-issues

Description

@spring-projects-issues

Dave Syer opened SPR-4622 and commented

Allow default values to be specified for System properties in ResourceEditor. It is really nice that ResourceEditor replaces placeholders with System properties, but it isn't helpful that it ignores (logging at warning level) missing values. It would be useful to specify a default, e.g.

<property name="location" value="classpath:application-${environment:test}.properties"/>
would evaluate to "classpath:application-test.properties" by default, and can be overridden by a System property.


Affects: 2.5.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions