I have the following property in my application.properties.
spring.profiles.active=dev,local
This works fine. However, I decided to also expose this as an environment variable and keep dev,local
as the default values. However the following does not work.
spring.profiles.active=${PROFILES_ACTIVE:dev,local}
It seems comma causes this issue.
Checking the logs
[2018-05-24 05:38:28.163] [main] [INFO] [Application] The following profiles are active: ${PROFILES_ACTIVE:dev,local}
However, the following works.
spring.profiles.active=${PROFILES_ACTIVE:dev}
Any suggestions on how go about this?
Try:
spring.profiles.active=${PROFILES_ACTIVE:#{'dev,local'}}
It uses the EL syntax with templating.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With