Setting up Spring Cloud Config Server

Let's set up the Cloud Config Server using Spring Initializr (http://start.spring.io). The following screenshot shows GroupId and ArtifactId to choose. Make sure that you select Config Server as a dependency:

If you want to add the Config Server to an existing application, use the dependency shown here:

    <dependency>      <groupId>org.springframework.cloud</groupId>      <artifactId>spring-cloud-config-server</artifactId>    </dependency>

Once the project is created, the first step is to add the EnableConfigServer annotation. The following snippet shows the annotation added to ConfigServerApplication:

 @EnableConfigServer ...

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.