Spring Cloud Configuration Server not working with local properties file

后端 未结 9 2190
渐次进展
渐次进展 2020-12-05 07:43

I have been playing around with the Spring Cloud project on github located here: https://github.com/spring-cloud/spring-cloud-config

However I have been running into

9条回答
  •  时光说笑
    2020-12-05 08:32

    The config server will read the local properties files if the application.properties of config server contains:

    spring.profiles.active=native
    **spring.cloud.config.server.native.searchLocations=file:/source/tmp**
    

    at /source/tmp directory, you store the local property file for client, for example:

    http://localhost:8888/a-bootiful-client/default
    

    you will get:

    {"name":"a-bootiful-client","profiles":["default"],"label":null,"version":null,"state":null,"propertySources":[{"name":"file:/source/tmp/a-bootiful-client.properties","source":{"message":"Kim"}}]}
    

提交回复
热议问题