Problem
A service
typically calls other services and databases as well. For each environment like
dev, QA, UAT, prod, the endpoint URL or some configuration properties might be
different. A change in any of those properties might require a re-build and
re-deploy of the service. How do we avoid code modification for configuration
changes?
Solution
Externalize
all the configuration, including endpoint URLs and credentials. The application
should load them either at startup or on the fly.
Spring
Cloud config server provides the option to externalize the properties to GitHub
and load them as environment properties. These can be accessed by the
application on startup or can be refreshed without a server restart.
No comments:
Post a Comment