![](/img/trans.png)
[英]Spring Cloud Config Server configuration with local repository
[英]spring cloud config server git for local file
我想使用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-boot-ws> demo-springcloud-m2-configserver-git> pluralsight-spring-cloudconfig-wa-tolls-master> station1> s1rates.properties
顾名思义,使用git
意味着您必须设置包含配置而不是本地文件的存储库的uri。 如果要使用本地文件,则应按如下方式配置服务器:
spring:
profiles:
active: native
cloud:
config:
server:
native:
searchLocations: file:///...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.