I've run into a next situation: I've migrated my application from Spring Boot 1.5.x to Spring Boot 2.0.5.
I have the next class:
@ConfigurationProperties(prefix = "some.property")
public class Myclass {
@Getter
@Setter
private List<String> list;
}
Also I have yml config like this:
some:
property:
list:
- value 1
- value 2
- value 3
This config is fetched from remote spring-cloud-config server.
If I try to run application I have next exception:
org.springframework.boot.
context.properties.bind.BindException: Failed to bind properties under
'some.property' to Myclass
Description:
Property: some.property.list[0]
Value: value 1
Origin: "some.property.list[0]" from property source "bootstrapProperties"
Reason: The elements
[some.property.list[0],some.property.list[1],some.property.list[2]] were
left unbound.
Property: some.property.list[1]
Value: value 2
Origin: "some.property.list[1]" from property source "bootstrapProperties"
Reason: The elements
[some.property.list[0],some.property.list[1],some.property.list[2]] were
left unbound.
Property: some.property.list[2]
Value: value 3
Origin: "some.property.list[2]" from property source "bootstrapProperties"
Reason: The elements
[some.property.list[0],some.property.list[1],some.property.list[2]] were
left unbound.
But if I use local bootstrap.yml file not remote config server - everything is fine.
Has anybody run in to the same problem ? I really need your help.
P.S. Spring config server has version 2.0.5 too.