一 代码位置
https://github.com/cakin24/spring-cloud-code/tree/master/ch13-1
二 启动consul
consul agent -dev -ui
浏览器访问 http://localhost:8500
三 测试
1 启动ch13-1-consul-provider
2 启动ch13-1-consul-consumer
3 浏览器输入:http://localhost:8500
4 浏览器输入: http://localhost:8082/hello?name=cakin
5 consul中给consul-config添加一个条配置
6 启动ch13-1-consul-config
7 浏览器输入: http://localhost:8083/getName
说明consul中的配置生效了。