In my application I have beans annotated with @Profile(\"prod\") and @Profile(\"demo\").
The first one, as you can guess :), is used on beans that
Spring provide two separate properties when determining which profiles are active:
spring.profiles.active and
spring.profiles.defaultIf spring.profiles.active is set, then its value determines which profiles are active. But if spring.profiles.active isn't set, then Spring looks to spring.profiles.default.
If neither spring.profiles.active nor spring.profiles.default is set, then there are no active profiles, and only those beans that aren't defined as being in a profile are created.Any bean that does not specify a profile belongs to default profile.