Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Inuyasha-Monster opened this issue May 16, 2023 · 1 comment

Comments

@Inuyasha-Monster
Copy link

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

@kimmking
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants