I just spent a lot of time trying to find out why a set of profile-specific configuration properties were not loaded in my app after I upgraded to 2.4.2. Simplified example:
application-include.yaml
spring:
profiles:
include:
- included
application-included.yaml
:
foo: included
The application started (with -Dspring.profiles.active=include
), but the foo
property was not there.
After some searching I found that this is no longer supported in 2.4. If I had written:
spring:
profiles:
include: included
I would have gotten an error message on application startup. But the validation logic in InvalidConfigDataPropertyException
looks explicitly for spring.profiles.included
, while the YAML I used translates to spring.profiles.included[0]
.
I admit I should have started by reading the release notes, which would have pointed me to the migration guide. Still, making the validation detect this case as well might save others some time. Maybe the error message could even contain a link to the migration guide.