- Use
@ConfigurationProperties
and always get state from the bean. - The
Environment
can change at runtime and Spring Cloud does this for you usingRefreshEvent
. - Changes are propagated to beans in Spring Cloud in 2 ways (
@ConfigurationProperties
and@RefreshScope
). - If you care about the state of
@ConfigurationProperties
being consistent on concurrent access, put it or the consumer@Bean
in@RefreshScope
.
Response to https://twitter.com/jeffreymaxwell/status/705760483391963136 requiring more than the 77 characters left on Twitter.
DISCLAIMER: The quality of writing and thinking here is aligned with a Twitter conversation, not a blog post, presentation, or book ;-)
Synchronous RESTful communication between Microservices is an anti-pattern ... you seem to being saying that the Netflix architecture (hystrix, eureka, ribbon, ..) is broken ... hmm what would @benjchristensen say?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
compile java 1.8, target java 1.7 | |
--> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.3</version> | |
<configuration> | |
<encoding>utf-8</encoding> | |
<source>1.8</source> |