update pic address

pull/20/head
flystar32 6 years ago
parent f19c0553fd
commit fb9c678ba1

@ -84,7 +84,7 @@
#### 验证自动注入
在浏览器地址栏输入 `http://127.0.0.1:18084/user`,并点击调转,可以看到成功从 Nacos Config Server 中获取了数据。
![get](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536720210111-3259ba19-9a6e-4fe9-9fb3-ab610c536f43.png)
![get](https://cdn.nlark.com/lark/0/2018/png/54319/1536986328663-5e3503c2-7e14-4c56-b5f9-72fecc6898d2.png)
#### 验证动态刷新
1. 执行如下命令,修改 Nacos Server 端的配置数据
@ -93,7 +93,7 @@
2. 在浏览器地址栏输入 `http://127.0.0.1:18084/user`,并点击调转,可以看到应用从 Nacos Server 中获取了最新的数据age 变成了 18。
![refresh](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536720077561-cedc7fab-2319-40bd-a56e-7378a2e7905e.png)
![refresh](https://cdn.nlark.com/lark/0/2018/png/54319/1536986336535-c0efdf6d-a5d3-4f33-8d26-fe3a36cdacf6.png)
## 原理
@ -156,7 +156,7 @@ Spring Boot 1.x 可以通过访问 http://127.0.0.1:18084/nacos-config 来查看
Spring Boot 2.x 可以通过访问 http://127.0.0.1:18084/actuator/nacos-config 来访问。
![actuator](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536719345564-96dbc4de-74e9-4e85-b1dd-2e9180256d8a.png)
![actuator](https://cdn.nlark.com/lark/0/2018/png/54319/1536986344822-279e1edc-ebca-4201-8362-0ddeff240b85.png)
如上图所示Sources 表示此客户端从哪些 Nacos Config 配置项中获取了信息RefreshHistory 表示动态刷新的历史记录最多保存20条NacosConfigProperties 则为 Nacos Config Starter 本身的配置。

@ -84,7 +84,7 @@ Before we start the demo, let's learn how to connect Nacos Config to a Spring Cl
#### Automatic Injection
Enter `http://127.0.0.1:18084/user` in the browser address bar and click Go to, we can see the data successfully obtained from Nacos Config Server.
![get](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536720210111-3259ba19-9a6e-4fe9-9fb3-ab610c536f43.png)
![get](https://cdn.nlark.com/lark/0/2018/png/54319/1536986328663-5e3503c2-7e14-4c56-b5f9-72fecc6898d2.png)
#### Dynamic Refresh
1. Run the following command to modify the configuration data on the Nacos Server side.
@ -94,7 +94,7 @@ Enter `http://127.0.0.1:18084/user` in the browser address bar and click Go to,
2. Enter `http://127.0.0.1:18084/user` in the browser address bar and click Go to,
We can see that the app got the latest data from Nacos Server and the age becomes 18.
![refresh](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536720077561-cedc7fab-2319-40bd-a56e-7378a2e7905e.png)
![refresh](https://cdn.nlark.com/lark/0/2018/png/54319/1536986336535-c0efdf6d-a5d3-4f33-8d26-fe3a36cdacf6.png)
## Principle
@ -159,7 +159,7 @@ To view the endpoint information, visit the following URLS:
Spring Boot1.x: Nacos Config Endpoint URL is http://127.0.0.1:18083/nacos-config.
Spring Boot2.x: Nacos Config Endpoint URL is http://127.0.0.1:18083/actuator/nacos-config.
![actuator](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536719345564-96dbc4de-74e9-4e85-b1dd-2e9180256d8a.png)
![actuator](https://cdn.nlark.com/lark/0/2018/png/54319/1536986344822-279e1edc-ebca-4201-8362-0ddeff240b85.png)
As shown in the figure above, Sources indicates which Nacos Config configuration items the client has obtained information, RefreshHistory indicates the dynamic refresh history, and up to 20, and NacosConfigProperties is the configuration of Nacos Config Starter itself.

@ -71,7 +71,8 @@
#### 查询服务
在浏览器输入此地址 `http://127.0.0.1:8080/nacos/v1/ns/instances?serviceName=service-provider`,并点击跳转,可以看到服务节点已经成功注册到 Nacos Server。
![查询服务](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536667114223-493655b5-c704-40b4-b4d2-eb9ace266c26.png)
![查询服务](https://cdn.nlark.com/lark/0/2018/png/54319/1536986288092-5cf96af9-9a26-466b-85f6-39ad1d92dfdc.png)
### 服务发现
@ -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",证明服务发现生效。
![rest](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536666933799-72f77e00-cd0c-461d-b469-d17a713720bf.png)
![rest](https://cdn.nlark.com/lark/0/2018/png/54319/1536986302124-ee27670d-bdcc-4210-9f5d-875acec6d3ea.png)
1. 在流量器地址栏中输入 http://127.0.0.1:18083/echo-feign/12345点击跳转可以看到浏览器显示 nacos-discovery-provider-example 返回的消息 "hello Nacos Discovery 12345",证明服务发现生效。
![feign](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536666947922-66724f3d-dbe3-4893-a7fb-88c10b03c6ef.png)
![feign](https://cdn.nlark.com/lark/0/2018/png/54319/1536986311685-6d0c1f9b-a453-4ec3-88ab-f7922d210f65.png)
## 原理
@ -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 来访问。
![actuator](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536824960576-174c4465-8bb2-4ea7-8370-61b90ee59fd9.png)
![actuator](https://cdn.nlark.com/lark/0/2018/png/54319/1536986319285-d542dc5f-5dff-462a-9f52-7254776bcd99.png)
如上图所示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.
![查询服务](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536667114223-493655b5-c704-40b4-b4d2-eb9ace266c26.png)
![查询服务](https://cdn.nlark.com/lark/0/2018/png/54319/1536986288092-5cf96af9-9a26-466b-85f6-39ad1d92dfdc.png)
### 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.
![rest](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536666933799-72f77e00-cd0c-461d-b469-d17a713720bf.png)
![rest](https://cdn.nlark.com/lark/0/2018/png/54319/1536986302124-ee27670d-bdcc-4210-9f5d-875acec6d3ea.png)
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.
![feign](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536666947922-66724f3d-dbe3-4893-a7fb-88c10b03c6ef.png)
![feign](https://cdn.nlark.com/lark/0/2018/png/54319/1536986311685-6d0c1f9b-a453-4ec3-88ab-f7922d210f65.png)
## 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.
![actuator](https://cdn-pri.nlark.com/lark/0/2018/png/54319/1536824960576-174c4465-8bb2-4ea7-8370-61b90ee59fd9.png)
![actuator](https://cdn.nlark.com/lark/0/2018/png/54319/1536986319285-d542dc5f-5dff-462a-9f52-7254776bcd99.png)
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.

Loading…
Cancel
Save