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.