The spring.profiles property was replaced in Spring Boot 2.4 with spring.config.activate.on-profile. We currently still support the old property and we should consider when to remove it.
Comment From: shawnz
What would be the intended way of setting the active profiles if this property were removed? My understanding is that spring.config.activate.on-profile doesn't actually activate the profile itself.
EDIT: Or is the intention only to deprecate spring.profiles.include but not spring.profiles.active?
Comment From: mbhave
@shawnz that's correct. spring.profiles.active is not deprecated and can be used to activate profiles.
Comment From: shawnz
Understood, thanks!
Comment From: raqueru
In this case we should simply remove every mention of spring.profiles.include or change it for other thing?
Comment From: philwebb
This issue is only about removing the spring.profiles property. The spring.profiles.include and spring.profiles.active properties will remain.
Comment From: raqueru
This issue is only about removing the
spring.profilesproperty. Thespring.profiles.includeandspring.profiles.activeproperties will remain.
got it! thanks
Comment From: philwebb
Moving this to 3.0.x and flagging for team attention because I'm not sure we should drop ConfigFileApplicationListener before then.
Comment From: linghengqian
As far as I can see, the documentation for SpringBoot 3.0.0-M2 (refer to https://docs.spring.io/spring-boot/docs/3.0.0-M2/reference/htmlsingle/#howto.properties-and-configuration.set-active-spring-profiles ) is still using this property, should setting -Dspring.profiles.active in the System property in the documentation tag conflict with spring.config.activate.on-profile?
Comment From: wilkinsona
As far as I can see, the documentation for SpringBoot 3.0.0-M2 is still using this property
That is to be expected as this issue is still open and we have not yet removed support for spring.profiles.