- Use
@ConfigurationPropertiesand always get state from the bean. - The
Environmentcan change at runtime and Spring Cloud does this for you usingRefreshEvent. - Changes are propagated to beans in Spring Cloud in 2 ways (
@ConfigurationPropertiesand@RefreshScope). - If you care about the state of
@ConfigurationPropertiesbeing consistent on concurrent access, put it or the consumer@Beanin@RefreshScope.