简介
Spring Cloud Config可以在分布式系统中统一管理服务的配置文件,它支持访问本地的配置文件,也支持访问Git仓库中的配置文件。在spring cloud 项目中,它扮演两个角色,一个是config server,另一个是eureka client。
构建Config Server
右键spring-cloud-parent->New->Module->Spring Initializr->Next
然后Next
勾选Cloud config 下的 Config Server 和 Cloud Discovery 下的 Eureka Discovery Next->Finish