A step-by-step guide to managing configuration in a Spring Boot microservices architecture using Spring Cloud Config Server and HashiCorp Vault. Covers creating a catalog-service microservice, setting up a Git-backed Config Server, migrating service properties to the config server, and storing sensitive credentials (database username/password) securely in Vault with token-based authentication. Includes full code examples for JPA entities, repositories, services, REST controllers, and all relevant configuration files.
Table of contents
What is the need for Spring Cloud Config and Vault?Create our first microservice: catalog-serviceCreate a Spring Cloud Config ServerRefactor catalog-service to use the Config ServerUsing Vault for storing sensitive dataSummaryReferences:Sort: