Consider the following external application.properties:
spring.profiles.active=dev
my.property=external
and the following src/main/resources/application-dev.properties:
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).
Consider the following external
application.properties:and the following
src/main/resources/application-dev.properties:When running the application,
my.propertywill resolve tointernal, whereas documentation clearly states that it should not be so: