12345678910111213141516171819202122 |
- 微服务客户端
- 1、添加依赖
- 2、启动类添加注解
- 3、yml配置注册中心地址
- 配置中心客户端
- 1、添加依赖
- 2、添加bootstrap.yml文件指定要读取的配置信息
- http://localhost:8888/application/profile
- application:服务名,profile:环境,label:版本分支
- /{application}/{profile}[/{label}]
- /{application}-{profile}.yml
- /{label}/{application}-{profile}.yml
- /{application}-{profile}.properties
- /{label}/{application}-{profile}.properties
- 读取顺序(可能不对):
- bootstrap.yml
- application.yml
- 配置中心的application.yml
- 配置中心的applicationname.yml
- 后面覆盖前面
|