Skip to content

Internal profile-specific properties override external non-profile-specific properties #2404

Closed
@axtavt

Description

@axtavt

Consider the following external application.properties:

spring.profiles.active=dev
my.property=external

and the following src/main/resources/application-dev.properties:

my.property=internal

When running the application, my.property will resolve to internal, whereas documentation clearly states that it should not be so:

Spring Boot uses a very particular PropertySource order that is designed to allow sensible overriding of values, properties are considered in the the following order:
...
6. Application properties outside of your packaged jar (application.properties including YAML and profile variants).
7. Application properties packaged inside your jar (application.properties including YAML and profile variants).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions