小知识:SpringCloudConfigServer从git获取配置信息报错:.c.s.e.MultipleJGitEnvironmentRepository : Error occured cloning to base directory.

因为SpringCloudConfig相关的配置信息在程序启动时进行配置信息查询,这个动作发生在application.yml加载之前。

因此需要把springcloudconfig相关的配置信息配置到bootstrap.yml中。
例:bootstrap.yml中配置如下信息:
spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/xxx/spring-cloud-config-repository.git
          username: xxx
          password: yyyy
          default-label: master
          search-paths: config
          skip-ssl-validation: true

猜你喜欢

转载自www.cnblogs.com/chongpf/p/12380348.html