This repository contains the Spring Cloud Config Server for the online-store microservices ecosystem.
The Config Server acts as a centralized configuration authority, externalizing application configuration from individual microservices and enabling a cleaner, more scalable architecture aligned with enterprise best practices.
This project is intentionally minimal and infrastructure-focused, designed to support future growth without introducing unnecessary complexity at early stages.
The Config Server is responsible for:
-
Centralizing configuration for all microservices in the online-store system
-
Loading configuration from a dedicated Git repository
-
Serving environment-agnostic configuration to services at startup
-
Acting as an internal infrastructure component (never exposed to clients)
-
Registering itself with the Service Discovery server (Eureka)
Important:
Microservices do not currently consume configuration from this server. It is implemented proactively to follow industry standards and prepare the architecture for future evolution.
Client
↓
API Gateway
↓
Business Microservices
↓
──────────────────────────
Config Server (internal)
Service Discovery (Eureka)
──────────────────────────
-
The Config Server is not part of the business flow
-
It is not accessed directly by clients
-
It exists purely as a platform-level component
This separation is deliberate and aligns with traditional, proven microservice architectures.
-
Java 17+
-
Spring Boot
-
Spring Cloud Config Server
-
Spring Cloud Netflix Eureka Client
-
Git-based configuration backend
All configurations are stored in this repository:
- Structure: one YAML file per microservice
Example structure:
config-data/
├── products-service.yml
├── shopping-carts-service.yml
├── users-service.yml
Each file is a direct conversion from the microservice’s original application.properties to YAML format.
server:
port: 8081
spring:
application:
name: config-server
cloud:
config:
server:
git:
uri: https://github.com/matias-devv/repository-config-server.git
search-paths: config-data
username: ${GIT_USERNAME}
password: ${GIT_PASSWORD}- Git credentials are injected via environment variables
- No hardcoded sensitive data is stored in the repository
- No profiles are currently used
@SpringBootApplication
@EnableDiscoveryClient
@EnableConfigServer
public class ConfigServerApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigServerApplication.class, args);
}
}@EnableConfigServer: activates Config Server capabilities@EnableDiscoveryClient: registers the service in Eureka
-
The Config Server registers successfully with Eureka
-
Discovery is enabled but not actively used at this stage
-
This is a forward-looking decision to ensure compatibility with:
- dynamic environments
- cloud-native deployments
- future scaling strategies
Current state:
-
No encryption
-
No authentication filters
-
No secret management
Rationale:
This project is intentionally kept simple and transparent, focusing on:
-
architectural correctness
-
separation of concerns
-
learning objectives
Security hardening is planned for future iterations.
This Config Server exists because:
-
Centralized configuration is a long-standing enterprise standard
-
It decouples infrastructure from business logic
-
It prepares the system for:
-
multiple environments
-
configuration changes without redeployments
-
scalable DevOps workflows
-
Even if not consumed yet, its presence signals architectural maturity.
Potential enhancements:
-
Microservices consuming config at startup
-
Environment-specific profiles
-
Encryption of sensitive values
-
Spring Cloud Bus for dynamic refresh
-
Role-based access to configuration
This repository:
-
Is infrastructure-only
-
Contains no business logic
-
Is intentionally minimal by design
Simplicity here is a strategic decision, not a limitation.
Matias
Backend Java Developer
✔ Stable
✔ Production-architecture ready
✔ Designed for future extensibility