Improve/disambiguate the documentation for spring.profiles.active #17436
Labels
status: superseded
An issue that has been superseded by another
type: documentation
A documentation update
According to the documentation:
The example in the documentation shows two included profiles that look to have mutually exclusive properties:
As evidenced by this question, and this comment, the documentation is a bit ambiguous.
Let's add this extra information to the documentation:
What happens when the active profile has a property definition that is also defined in one of the included profiles?
application-foo.yaml
application-bar.yaml
In this case,
foo
wins andmyCustomProperty = 10
.What happens when the included profiles do not have mutually exclusive property definitions?
application-x.yaml
application-y.yaml
application-z.yaml
In this,
y
wins andmyCustomProperty = 20
.Also, IMHO, when the included profiles (e.g. x and y in the example above) have shared property definitions, a warning log message should be emitted as I think a situation like this is the sign of a potential misconfiguration by the user.
The text was updated successfully, but these errors were encountered: