spring-cloud-commons
spring-cloud-commons copied to clipboard
ConfigurationPropertiesRebinder finally use method.invke(xx) to update field , Is there an issue with memory visibility here ?
@ConfigurationProperties(prefix = "book")
@Component
public class BootConfig {
private String author;
private String category;
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
@Override
public String toString() {
return "BootConfig{" +
"author='" + author + '\'' +
", category='" + category + '\'' +
'}';
}
}
there fields no volatile flag....
IMO, that's not in a level between config properties and volatile fields.