小知識: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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM