mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
update pic address
This commit is contained in:
@@ -71,7 +71,8 @@
|
||||
|
||||
#### 查询服务
|
||||
在浏览器输入此地址 `http://127.0.0.1:8080/nacos/v1/ns/instances?serviceName=service-provider`,并点击跳转,可以看到服务节点已经成功注册到 Nacos Server。
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
### 服务发现
|
||||
@@ -142,11 +143,11 @@ Nacos Discovery Starter 默认集成了 Ribbon ,所以对于使用了 Ribbon
|
||||
#### 验证
|
||||
1. 在流量器地址栏中输入 http://127.0.0.1:18083/echo-rest/1234,点击跳转,可以看到浏览器显示了 nacos-discovery-provider-example 返回的消息 "hello Nacos Discovery 1234",证明服务发现生效。
|
||||
|
||||

|
||||

|
||||
|
||||
1. 在流量器地址栏中输入 http://127.0.0.1:18083/echo-feign/12345,点击跳转,可以看到浏览器显示 nacos-discovery-provider-example 返回的消息 "hello Nacos Discovery 12345",证明服务发现生效。
|
||||
|
||||

|
||||

|
||||
## 原理
|
||||
|
||||
|
||||
@@ -176,7 +177,7 @@ Spring Boot 1.x 可以通过访问 http://127.0.0.1:18083/nacos-discovery 来查
|
||||
|
||||
Spring Boot 2.x 可以通过访问 http://127.0.0.1:18083/actuator/nacos-discovery 来访问。
|
||||
|
||||

|
||||

|
||||
|
||||
如上图所示,NacosDiscoveryProperties 则为 Spring Cloud Nacos Discovery 本身的配置,也包括本机注册的内容,subscribe 为本机已订阅的服务信息。
|
||||
|
||||
|
@@ -74,7 +74,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
|
||||
|
||||
Enter `http://127.0.0.1:8080/nacos/v1/ns/instances?serviceName=service-provider` in the browser address bar and click Go to, we can see that the service node has been successfully registered to Nacos Server.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Service Discovery
|
||||
@@ -146,11 +146,11 @@ The code of `nacos-discovery-consumer-example` project will be analyzed below, d
|
||||
#### Verification
|
||||
1. Enter `http://127.0.0.1:18083/echo-rest/1234` in the browser address bar and click Go to, we can see that the browser displays the message "hello Nacos Discovery 1234" returned by nacos-discovery-provider-example to prove that the service discovery is in effect.
|
||||
|
||||

|
||||

|
||||
|
||||
1. Enter `http://127.0.0.1:18083/echo-feign/12345` in the browser address bar and click Go to, we can see that the browser displays the message "hello Nacos Discovery 12345" returned by nacos-discovery-provider-example to prove that the service discovery is in effect.
|
||||
|
||||

|
||||

|
||||
|
||||
## Principle
|
||||
|
||||
@@ -184,7 +184,7 @@ To view the endpoint information, visit the following URLS:
|
||||
Spring Boot1.x: Nacos Discovery Endpoint URL is http://127.0.0.1:18083/nacos-discovery.
|
||||
Spring Boot2.x: Nacos Discovery Endpoint URL is http://127.0.0.1:18083/actuator/nacos-discovery.
|
||||
|
||||

|
||||

|
||||
|
||||
As shown in the figure above, NacosDiscoveryProperties is the configuration of Nacos Discovery itself, and also includes the contents registered by the application, subscribe is the service information that the application has subscribed to.
|
||||
|
||||
|
Reference in New Issue
Block a user