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
Binding to collection fails with unbound elements error if collection overridden in another property source #16290
Comments
Thanks for the sample, that is very useful. We've tighten the mechanism to merge complex types, see the documentation. I am not sure if we intended to throw an exception if you combine that with |
I think it's a bug and we shouldn't throw an exception since the list is completely overridden. |
I would be happy to work on this issue should the |
Thanks for the offer @rhamedy but I'm already looking into this. |
Hello,
after migrated from Spring Boot 1.5.3.RELEASE to 2.1.3.RELEASE we've encountered a bug(?) with property binding.
The example code can be found here. It's a simple application with one property class that receives values from the application.yml via the @ConfigurationProperties annotation.
Starting the DemoApplication works fine.
But starting the simple DemoApplicationTests does not work, as the demo uses "test" profile and therefore the property class receives it's values from "application-test.yml".
The excepton does NOT occur if "ignoreUnknownFields" is NOT present (i.e., set to true).
The bug does only appear when the list in application-test.yml is SMALLER than the list in application.yml.
Regards,
Manuel
The text was updated successfully, but these errors were encountered: