一、引言

  当我们有很多很多微服务时,每个微服务的配置如果都要在工程中维护的话,会非常难受,比如我改一个数据库的地址,就得把所有工程的配置一个一个修改,是不是很麻烦?那根据抽象思想,我们能不能把这些重复的配置抽象出来呢?Nacos配置中心就帮我们实现了这么一个功能。

  PS:Nacos很强大,还可以实现注册中心的功能,不过因为之前我们选用了Eureka,所以这篇文章主要说明的是Nacos作为配置中心的功能。

二、下载并配置Nacos服务端

  下载地址:https://github.com/alibaba/nacos/releases

解压

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

三、数据储存配置变更

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

Spring Cloud(五)Nacos配置中心

 

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2021-04-29
  • 2021-04-06
  • 2021-06-02
猜你喜欢
  • 2021-11-02
  • 2022-12-23
  • 2021-09-01
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
相关资源
相似解决方案