File tree 3 files changed +10
-4
lines changed
labx-27-sc-consul-discovery-demo01-consumer/src/main/resources
labx-27-sc-consul-discovery-demo01-provider/src/main/resources
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
spring :
2
2
application :
3
3
name : demo-consumer # Spring 应用名
4
+
4
5
cloud :
5
- zookeeper :
6
- connect-string : 127.0.0.1:2181
7
- # Zookeeper 作为注册中心的配置项,对应 ZookeeperDiscoveryProperties 配置类
6
+ # Spring Cloud Consul 通用配置项,对应 ConsulProperties 类
7
+ consul :
8
+ host : 127.0.0.1 # Consul 主机
9
+ port : 8500 # Consul 端口
10
+ # Spring Cloud Consul Discovery 配置项,对应 ConsulDiscoveryProperties 类
8
11
discovery :
9
- root : /services # Zookeeper 数据存储的根节点,默认为 /services
12
+ service-name : ${spring.application.name} # 注册到 Consul 的服务名,默认为 `spring.application.name` 配置项
13
+ health-check-path : /actuator/health # 健康检查的接口,默认为 /actuator/health,由 Spring Boot Actuator 提供
10
14
11
15
server :
12
16
port : 28080 # 服务器端口。默认为 8080
Original file line number Diff line number Diff line change 9
9
# Spring Cloud Consul Discovery 配置项,对应 ConsulDiscoveryProperties 类
10
10
discovery :
11
11
service-name : ${spring.application.name} # 注册到 Consul 的服务名,默认为 `spring.application.name` 配置项
12
+ health-check-path : /actuator/health # 健康检查的接口,默认为 /actuator/health,由 Spring Boot Actuator 提供
12
13
13
14
server :
14
15
port : 18080 # 服务器端口。默认为 8080
Original file line number Diff line number Diff line change
1
+ < http://www.iocoder.cn/Spring-Cloud/Consul-Discovery/?github >
You can’t perform that action at this time.
0 commit comments