-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Describe the bug
If I use spring-boot-starter-parent = 2.4.8 vs 2.5.2 then I can't read spring.profiles.active from the Config Server's files
When running with application.properties with a value of spring.profiles.default=local it connects to the config server and reads both properties files:
==> src/main/resources/config/config-client-local.properties <==
readProfile=ConfigServerReadActiveProfile-Local
==> src/main/resources/config/config-client.properties <==
readProfile=ConfigServerReadActiveProfile
spring.profiles.active=${readProfile}
And the client outputs
The following profiles are active: ConfigServerReadActiveProfile-Local
But if I switch to 2.5.2 (or 2.5.0, 2.5.1) I get
No active profile set, falling back to default profiles: local
Was this an intended change?
Example
config-server-client-active-profile.zip
Run first the server mvn spring-boot:run -f config-server/pom.xml then the client mvn spring-boot:run -f config-client/pom.xml
As packaged you will see the No active profile set message, if you edit the spring-boot-starter-parent version in the root pom and run the client again, you will get the The following profiles are active message