SpringCloud学习笔记三
分布式配置中心 Spring cloud configspring cloud config 是用来为分布式系统中的基础设施和微服务应用提供集中化的外部配置支持,它分为服务端和客户端,其中服务端被称为分布式配置中心,它是一个独立的微服务应用,用来链接仓库,并为客户端提供配置信息。 快速入门搭建配置中心 创建工程,导入相关依赖 12345<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId></dependency> 在主程序类中开启sprong cloud config的服务端功能 12345678@SpringBootApplication@EnableConfigServerpublic class ConfigServerApplication { public static void main(String[] args) { SpringApplication.run(ConfigServerApplication.class, args); }}
