Configuring the Spring Boot application

It's a piece of cake to enable and run the Config Server and provide our configuration HTTP protocol. To achieve it, we need to put the following annotation in our Spring Boot starter class. The implementation is as follows:

package springfive.airline.configserver;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.cloud.config.server.EnableConfigServer;@EnableConfigServer@SpringBootApplicationpublic class ConfigServerApplication {  public static void main(String[] args) {    SpringApplication.run(ConfigServerApplication.class, args);  }}

Awesome. @EnableConfigServer does the magic for us. It will stand up the Config ...

Get Spring 5.0 By Example 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.