首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >spring cloud config server git for local file

spring cloud config server git for local file
EN

Stack Overflow用户
提问于 2019-06-12 13:56:31
回答 1查看 1.3K关注 0票数 0

我想使用spring cloud config server git从本地文件中获取数据。

我已经尝试了以下Yaml配置,但它不工作。

服务器:端口: 8888

spring: cloud: config: server: git: uri: file:///C:/spring-boot-ws/demo-springcloud-m2-configserver-git/pluralsight-spring-cloudconfig-wa-tolls-master/

我的文件夹结构如下

C:>spring- station1 -ws> demo-springcloud-m2-configserver-git >>station1> s1rates.properties

EN

回答 1

Stack Overflow用户

发布于 2019-06-12 16:19:41

顾名思义,使用git意味着您必须设置包含配置的存储库的uri,而不是本地文件。如果你想使用本地文件,你应该这样配置你的服务器:

代码语言:javascript
复制
spring:
   profiles:
     active: native
   cloud:
      config:
        server:
          native:
            searchLocations: file:///...
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56555500

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档