Hi,
I just came across a small issue that happens if I try to set some nested @ConfigurationProperties using both environment variables and application properties. Suppose I have a List<Item> property, and Item defines name and secret properties.
If I set name using a properties file (i.e. <some-prefix>.items[0].name=foo) and secret using an environment variable (SOMEPREFIX_ITEMS_0_SECRET=bar), then name is set to null. Using the same source (either properties or environment variables) for both properties works as expected.
I first noticed the bug in version 2.5.7 but I was able to reproduce it in 2.6.7.
Here you can find a simple Spring Boot project that reproduces the issue.
Thanks,
lorenzo
Comment From: wilkinsona
This is working as described in the documentation.
Comment From: lorenzobenvenuti
Thanks, I came across that page but I thought the behavior was applied only when using profiles, not for different sources within the same profile.