The Spring Cloud Services Config Server is based on the Spring Cloud Config project. See below for information about the open-source Spring Cloud project.
The Spring Cloud Config project, like the rest of Spring Cloud, builds on Spring Boot. It provides a source of centralized configuration for microservice applications.
Spring Cloud Config includes a configuration server, which can use any of a variety of backends–for example, a Git repository–to store configuration values. On startup, it reads in the configuration from its backends. Client applications can then access the Config Server to dynamically receive externalized configuration.
In a Git backend, the files that contain configuration values indicate by their filenames whether they apply to all client applications or to only a given application, application profile, or application and profile. When a client application requests configuration, the configuration server returns a unified set of the values that apply to that application with its active profiles.
A client application requests its configuration on startup. A Spring application can use the Config Client library, included in Spring Cloud Config, to connect to the configuration server and consume received configuration values through Spring property sources.
Spring Cloud Config Server
Spring Cloud Config provides an embeddable configuration server, which can be enabled in a Spring Boot application using the
@EnableConfigServer annotation. When the Spring Cloud Config Server dependency (
spring-cloud-config-server) is included, the application becomes a Spring Cloud Config configuration server.
In a Spring Cloud Config server application, the server configuration can be set using
spring.cloud.config.server properties in
spring: cloud: config: server: git: uri: https://github.com/spring-cloud-samples/config-repo deleteUntrackedBranches: true
Spring Cloud Config Client
Spring Cloud Config includes the Config Client library for Spring applications to use to connect to a Spring Cloud Config configuration server and consume configuration values. When the Config Client starter (
spring-cloud-starter-config) dependency is included, the application becomes a client of a Spring Cloud Config configuration server.
In a Spring Cloud Config client application, Config Client configuration can be set using the
spring.cloud.config properties in
spring: cloud: config: label: v1.1 uri: http://localhost:8888