04‐a Spring Cloud Config - christyjohn/Microservices_SpringBoot_Udemy GitHub Wiki
Spring Cloud Config
Spring Cloud Config provides centralized external configuration management for distributed systems (especially microservices).
Instead of each microservice having its own application.properties or application.yml, configuration is stored in a central repository and served dynamically.
1️⃣ Core Components
1. Config Server
- A standalone Spring Boot application.
- Exposes REST endpoints for configuration.
- Fetches configuration from a backend (Git, file system, Vault, etc.).
- Acts as a central config hub.
2. Config Clients
- Microservices (Spring Boot apps).
- On startup, they call Config Server to fetch configuration.
- Inject properties into the Spring Environment.
3. Configuration Repository
Typically:
- Git repository (most common)
- File system
- SVN
- Vault
- AWS S3
- Database
ConfigServer microservice
@EnableConfigServer
Add at the main class.