You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application which has following application properties files either in the working directory of the application (file:) or in the Maven's src/main/resources directory (classpath:):
After running application main class from Eclipse with such configuration I see that LOCAL, DEV, LOCAL-SPECIAL, DEV-SPECIAL profiles are active as expected.
What is not ok is the order in which those files are loaded.
In Spring Boot 2.0.2 the order of files (from the least significant) is:
file: application.properties:
classpath: application-LOCAL.properties
classpath: application-DEV.properties
file: application-DEV.properties
classpath: application-LOCAL-SPECIAL.properties
In Spring Boot 1.5.10 it was:
file: application.properties:
classpath: application-LOCAL.properties
classpath: application-DEV.properties
classpath: application-LOCAL-SPECIAL.properties
file: application-DEV.properties
As the documentation for externalized configuration mentions that profile-specific application properties outside of your packaged jar (file: in my case) should have higher precedence over profile-specific application properties packaged inside your jar (classpath: in my case) this seems for me to be a bug in Spring Boot 2.
The text was updated successfully, but these errors were encountered:
I have an application which has following application properties files either in the working directory of the application (file:) or in the Maven's src/main/resources directory (classpath:):
spring.profiles.include=LOCAL,DEV
spring.profiles.include=LOCAL-SPECIAL
spring.profiles.include=DEV-SPECIAL
After running application main class from Eclipse with such configuration I see that LOCAL, DEV, LOCAL-SPECIAL, DEV-SPECIAL profiles are active as expected.
What is not ok is the order in which those files are loaded.
In Spring Boot 2.0.2 the order of files (from the least significant) is:
In Spring Boot 1.5.10 it was:
As the documentation for externalized configuration mentions that profile-specific application properties outside of your packaged jar (file: in my case) should have higher precedence over profile-specific application properties packaged inside your jar (classpath: in my case) this seems for me to be a bug in Spring Boot 2.
The text was updated successfully, but these errors were encountered: