Spring Cloud Configuration Server Using File — Native Mode

Farzin Pashaee
CodeX

--

The native mode for configuration in Spring Cloud refers to keeping configuration files locally on the host machine for the application. As opposed to other techniques, such as obtaining configurations from a distant configuration server, this.

When the application is in native mode, it reads its configuration straight from local files. Now as part of the Spring Cloud out-of-the-box feature, you can create a centralized configuration server and use native mode to store the config file if you are not interested in using Git or JDBC to store the configuration.

Getting Start

It is pretty easy to start a Spring Cloud Configuration server you just need to add the following dependency and Enable the server using @EnableConfigServer annotation.

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

You can add the @EnableConfigServer to the application's main class like the following example:

@SpringBootApplication
@EnableConfigServer
public class…

--

--

CodeX
CodeX

Published in CodeX

Everything connected with Tech & Code. Follow to join our 1M+ monthly readers

Farzin Pashaee
Farzin Pashaee

Written by Farzin Pashaee

Software Engineer at Maybank, AI and ML enthusiastic

No responses yet