Spring Cloud Config Server: Centralized Configuration
Fast recall
Quick revision
Core answer
Whether you understand the server/client architecture, how profile and label resolution works, and how you handle secret management — not storing passwords in plaintext in Git
Storing unencrypted secrets (database passwords, API keys) in the Git config repository — Config Server provides encryption via JCE or delegating to HashiCorp Vault
Explain the {application}-{profile}.yml resolution order, describe how to use {cipher} prefixes for encrypted values, discuss using Vault as a backend for secrets and Git for non-sensitive config, and mention Config Server HA patterns (multiple instances, native filesystem as fallback)
Interview-ready guide
Interview answer
Spring Cloud Config centralizes configuration in a Git repository and serves it to services at startup. Instead of managing config files across every service, you maintain one Git repo.
Services bootstrap by contacting the Config Server, which resolves properties by application name, profile, and Git branch. order-service with profile prod gets order-service-prod.yml.
The trade-off: Config Server is a single point of failure. If it's down, services can't start. Run multiple instances behind a load balancer and enable client retry.
Config changes in Git don't auto-propagate. `@RefreshScope` recreates beans on /actuator/refresh. For many instances, Spring Cloud Bus broadcasts refresh events via RabbitMQ or Kafka.
Sensitive properties can be encrypted in Git with {cipher} prefix — the Config Server decrypts before serving to clients.
In practice, Config Server works well for non-secret configuration. For secrets, pair it with HashiCorp Vault or a cloud secret manager.
Spring Cloud Config Server: Centralized Configuration
Direct Answer
Spring Cloud Config Server serves application configuration from a Git repository (or filesystem/Vault) over HTTP. Clients fetch their properties on startup using /APP/PROFILE/LABEL. Config data is decoupled from the deployable artifact, and properties can be refreshed at runtime using Spring Cloud Bus without restarting services.
Common Mistakes & Pitfalls
Storing unencrypted secrets (database passwords, API keys) in the Git config repository — Config Server provides encryption via JCE or delegating to HashiCorp Vault
Check your understanding
Answer these without looking back at the article.
- How do you trigger a live configuration refresh without restarting services?
- What happens if the Config Server is unreachable when a service starts?
- How would you manage environment-specific secrets securely with Spring Cloud Config?
Related interview prep categories
2Want a guided curriculum order?
These modules are also sequenced in our flagship backend interview track — open it when you prefer an ordered path instead of browsing by topic.