Skip to main content
Version: 12.10.0

Centralized Configuration Service

The Spring Cloud Config Service is designed to manage and serve configuration properties for distributed systems. It supports versioned configuration files stored in Git, SVN, or local file systems.

Pre requisites

Before you begin, make sure you have the following prerequisites:

  • Java Development Kit (JDK)
  • Spring Boot CLI or IDE (IntelliJ IDEA, Eclipse, etc.)
  • Git (for configuration repository)

Installation

  1. Clone the Spring Cloud Config Service repository from [GitHub Repository URL].
  2. Open the project in your chosen IDE or use the Spring Boot CLI.
  3. Configure the necessary properties in application.properties or application.yml.
  4. Build and run the Spring Boot application.

3. Configuration Repository

The Spring Cloud Config Service uses a versioned configuration repository to store configuration files. By default, it supports Git repositories.

Configure the repository location using the following property:

spring.cloud.config.server.git.uri=<repository_url>

Refresh

Configure webhooks to trigger configuration updates. Use the /actuator/refresh endpoint to refresh configuration without restarting the service.

Client Integration - Fetching Configuration:

In the section about integrating client services with the Spring Cloud Config Service, provide an example using application.properties:

Client Integration - Fetching Configuration

Integrate your microservices with the Spring Cloud Config Service to fetch configurations. Use the following properties to configure the client in application.properties:

spring.application.name=<service_name>
spring.cloud.config.uri=<config_service_url>

Using Profiles:

For using profiles to manage configurations, provide an example using application-{profile}.properties:

Use profiles to manage configurations for different environments. Add a profile-specific configuration file in the format application-{profile}.properties in the repository.