Grokking Microservices Design Patterns
Vote
0% completed
Configuration Externalization: A Code Example
Now that the architecture is clear, here is an implementation in Java.
Using Spring Cloud Config
Spring Cloud Config is a common tool for this pattern in the Java world. It provides both halves: a server that holds the settings, and a client that reads them.
The server is a normal Spring Boot application with one annotation added.
@SpringBootApplication @EnableConfigServer public class ConfigServer { public static void main(String[] args) { SpringApplication.run(ConfigServer.class, args); } }
The `@EnableConfigServer
.....
.....
.....
Like the course? Get enrolled and start learning!