官术网_书友最值得收藏!

Spring Cloud Config

This exciting project provides an easy way to manage system configurations for distributed systems, and this is a critical issue in cloud environments because the file system is ephemeral. It also helps us to maintain different stages of the deployment pipeline. Spring profiles are fully integrated with this module.

We will need an application that will provide the configuration for other applications. We can understand its workings by thinking of the concepts of the server and the client, the server will provide some configurations through HTTP and the client will look up the configuration on the server. Also, it is possible to encrypt and decrypt property values.

There are some storage implementations to provide these property files, and the default implementation is Git. It enables us to store our property files in Git, or we can use the file system as well. The important thing here is that the source does not matter.

Git is a distributed version control. The tool is commonly used for development purposes, especially in the open-source community. The main advantage, when you compare it to some market players, such as SVN, is the distributed architecture.

There is an interesting integration between Spring Cloud Bus and this module. If they are integrated, it is possible to broadcast the configuration changes on the cluster. This is an important feature if the application configuration changes with frequency. There are two annotations that tell Spring to apply changes at runtime: @RefreshScope and @ConfigurationProperties.

In Chapter 7Airline Ticket System, we will implement an exciting service to provide external configurations for our microservices using this module. Server concepts will be explained in more detail. The client details will be presented as well.

   @EnableConfigServer is a common annotation.
主站蜘蛛池模板: 禹州市| 青铜峡市| 张家界市| 简阳市| 洛阳市| 廉江市| 盱眙县| 左贡县| 同江市| 南汇区| 肃南| 榆社县| 绍兴市| 芷江| 上思县| 新余市| 通海县| 潍坊市| 诸暨市| 静宁县| 阿勒泰市| 馆陶县| 南郑县| 宣威市| 博爱县| 腾冲县| 伽师县| 平山县| 河间市| 潼南县| 疏勒县| 夹江县| 常山县| 灵川县| 丰顺县| 杨浦区| 隆尧县| 黑水县| 香格里拉县| 绥化市| 东至县|