- update search location based on the server's location in your file system
cloud: config: server: native: searchLocations: file:///D:/Projects D/test-spring-boot-cloud-config/configs/${app-env}
- run service (default port 8100)
- check server start up:
> curl localhost:8100 hello world
- run service (default port 8101)
- check client start up:
> curl localhost:8101 hello world from client
-
Default setup case: expect API response "default", because client's spring.cloud.config.enabled=false
server.port=8101 spring.cloud.config.enabled=false #spring.config.import=configserver:http://localhost:8100 #spring.application.name=test-spring-boot-cloud-config-client loaded-config=default
> curl localhost:8101/configs default
-
DEV case:
- update client's properties to following:
server.port=8101 spring.config.import=configserver:http://localhost:8100 spring.application.name=test-spring-boot-cloud-config-client loaded-config=default
- restart client
- expect API response "cloud-dev-config"
> curl localhost:8101/configs cloud-dev-config
- update client's properties to following:
-
INT case:
- update server's app-env config to int
app-env: int
- restart server
- restart client
- expect API response "cloud-int-config"
> curl localhost:8101/configs cloud-int-config
- update server's app-env config to int