Issue
I want my default active profile to be production
if -Dspring.profiles.active
is not set.
I tried the following in my application.properties
but it did't work:
spring.profiles.default=production
Spring-boot version = 1.3.5.RELEASE
Solution
What you are doing here is setting the default default profile (the profile that is used on any bean if you don't specify the @Profile
annotation) to be production
.
What you actually need to do is set the default active profile, which is done like this:
spring.profiles.active=production
Answered By - PaulNUK