-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Description
With 1.5.x I used to have a property binding like this; a comma-separated String to List<String>
.
@ConfigurationProperties(prefix = "foo.bar")
public class MyAppProperties {
private final Kafka kafka = new Kafka();
public Kafka getKafka() {
return this.kafka;
}
public static class Kafka {
private List<String> topics;
public void setTopics(List<String> topics) {
this.topics = topics;
}
...
foo.bar:
kafka:
topics: test,failures
With Boot 2.0.2 this now fails with
Failed to bind properties under 'foo.bar.kafka.topics' to java.util.List<java.lang.String>:
Reason: Unable to get value for property topics
Replacing List<String>
in the setter with String[]
fixes this.
public void setTopics(String[] topics) {
this.topics = Lists.newArrayList(topics);
}
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug