spring-cloud-commons icon indicating copy to clipboard operation
spring-cloud-commons copied to clipboard

ConfigurationPropertiesRebinder finally use method.invke(xx) to update field , Is there an issue with memory visibility here ?

Open Inuyasha-Monster opened this issue 2 years ago • 1 comments

@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....

Inuyasha-Monster avatar May 16 '23 13:05 Inuyasha-Monster

IMO, that's not in a level between config properties and volatile fields.

kimmking avatar Jan 16 '24 11:01 kimmking