There are many options to serve the properties over an HTTP connection, Consul and Zookeeper being popular ones. However, for Spring projects, Spring Cloud provides a flexible config server that can connect to multiple backends, including Git, databases, and filesystems. Given that the properties are best stored in a version control, we will use the Git backend for Spring Cloud Config for this example.
The Spring Cloud Config server code, configuration, and runtime is very similar to Eureka and it is easy to fire up an instance like we did for Eureka in Chapter 2, Writing Your First Cloud-Native Application.
Follow these steps to get a service registry running:
- Create a new Maven project with the artifact ...