I'm wondering if spring default profile is always applied, assuming its properties are not overwritten by another active profile?
e.g. I have properties defined which are only relevant to the default profile. I want these properties ignored when any other profile is activated, the properties won't be overwritten by another profile, they just don't apply once another profile is active.
From my testing, it seems these properties are still being picked up when I activate another spring profile. I am defining these properties in my spring application properties file.
I have also defined a Bean with the @Profile("default")
annotation and that Bean is not invoked when I activate another profile. But the properties I have defined in application.xml
under spring.profiles: default
are being applied.