今天在配置Spring Cloud Config Client读取Config Server在gitee的配置文件时,出现了使用URI方式不能正常读取Config Server配置的问题。
Spring cloud版本:Greenwich.SR2
Spring Boot版本:2.1.6.RELEASE
Spring Cloud和Spring Boot版本比较多,但是它们之间有明确的对应关系,可以去查询具体的对应版本(传送门:https://spring.io/projects/spring-cloud#overview)
此问题,具体的Config Server核心配置(bootstrap.yml)如下:
cloud:
config:
server:
git:
uri: https://gitee.com/username/springcloud-config-server
username:
password:
search-paths: config-files
default-label: master
此配置,经过测试没有发现问题,Config Server可以正常同步在gitee上的配置文件。