Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No error message when using spring.profiles.include in a profile-specific config file if it's written as a YAML list #25309

lbilger opened this issue Feb 16, 2021 · 0 comments


Copy link

@lbilger lbilger commented Feb 16, 2021

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:


      - included


foo: included

The application started (with, 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:

    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.

@mbhave mbhave added this to the 2.4.x milestone Feb 16, 2021
@mbhave mbhave self-assigned this Feb 16, 2021
@mbhave mbhave closed this in 00a358b Feb 17, 2021
@wilkinsona wilkinsona modified the milestones: 2.4.x, 2.4.3 Feb 17, 2021
This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants