I want get the data from local file using spring cloud config server git.
I have tried with below Yaml config but it is not working.
server: port: 8888
spring: cloud: config: server: git: uri: file:///C:/spring-boot-ws/demo-springcloud-m2-configserver-git/pluralsight-spring-cloudconfig-wa-tolls-master/
My folder Structure is like
C: > spring-boot-ws > demo-springcloud-m2-configserver-git > pluralsight-spring-cloudconfig-wa-tolls-master > station1 > s1rates.properties
As its name suggest, using git
means that you have to set the uri of the repository containing your configurations and not a local files. If you want to use local files you should configure your server like this:
spring:
profiles:
active: native
cloud:
config:
server:
native:
searchLocations: file:///...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.