Implementing Cloud Config Server

Let's implement an application main class that has more special annotations. Here, @SpringBootApplication will pull all the default and required configurations, and another annotation, @EnableConfigServer, will turn our application into a configuration server:

package com.dineshonjava.cloudconfigapp; 
 
import org.springframework.boot.SpringApplication; 
import org.springframework.boot.autoconfigure.SpringBootApplication; 
import org.springframework.cloud.config.server.EnableConfigServer; 
 
@SpringBootApplication 
@EnableConfigServer 
public class CloudConfigApplication { 
   public static void main(String[] args) { 
         SpringApplication.run(CloudConfigApplication.class, args); 
   } 
} 

As you can, this enables the application ...

Get Mastering Spring Boot 2.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.