Implementing Config Client | Reading configuration from GitHub | SpringBoot Microservices
We already have setup our ConfigServer (Article : Implementing config server to externalize configuration | SpringBoot Microservices).
Here we will setup our UserService microservice as Config Client so that it can read the configurations stored on the GitHub.
Step 1 → Add dependency “Config Client | SPRING CLOUD CONFIG“.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
Step 2 → Add configuration.
spring.config.import=configserver:http://localhost:8084
We are now getting configuration from the Config Server.
Subscribe to my newsletter
Read articles from Prashant Katare directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Prashant Katare
Prashant Katare
Experienced Spring Boot Developer with over 3+ years of expertise in developing scalable and high-performance web applications and microservices. Proficient in Java and Spring Boot frameworks, with hands- on experience in RESTful APIs and Microservices architecture. Adept at building secure, database-driven applications and integrating various third- party services. Strong problem-solving skills with a focus on delivering clean, maintainable, and efficient code.