-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed
Labels
theme: config-dataIssues related to the configuration themeIssues related to the configuration themetype: enhancementA general enhancementA general enhancement
Milestone
Description
I discovered this in trying to upgrade from Spring boot 1.4.1 to 2.0.0.M2
If I have a yaml file with the following:
myProperties: name: 'Sam'
and I have a configuration class:
@Configuration
@ConfigurationProperties(prefix="myProperties")
public class MyConfig {
private String name;
public String getName(){
return name;
}
public void setName(String name){
this.name = name;
}
}
I will get a bunch of errors trying to create the MyConfig
bean. Essentially the error boils down to:
Caused by: java.lang.IllegalArgumentException: Configuration property name 'myProperties' is not valid
I notice that if I change this line to:
@ConfigurationProperties(prefix="myproperties")
the error goes away. Using a prefix with capital letters in it used to work in 1.4.1 and 1.5.4
Metadata
Metadata
Assignees
Labels
theme: config-dataIssues related to the configuration themeIssues related to the configuration themetype: enhancementA general enhancementA general enhancement