Update README.md

This commit is contained in:
heibaiying 2019-01-19 20:37:08 +08:00 committed by GitHub
parent 4f0aa20d1a
commit efab56e449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,9 +4,9 @@
Spring Cloud Eureka使用Netflix Eureka来实现服务注册与发现它既包含了服务端组件也包含了客户端组件。
Eureka服务端服务的注册中心负责维护注册的服务列表。
**Eureka服务端**:服务的注册中心,负责维护注册的服务列表。
Eureka客户端 在应用程序运行时Eureka客户端向注册中心注册自身提供的服务并周期性地发送心跳来更新它的服务租约。同时它也能把从服务端查询到服务信息缓存到本地并周期性地刷新服务状态。
**Eureka客户端** 在应用程序运行时Eureka客户端向注册中心注册自身提供的服务并周期性地发送心跳来更新它的服务租约。同时它也能把从服务端查询到服务信息缓存到本地并周期性地刷新服务状态。
@ -66,7 +66,7 @@ public class EurekaServerApplication {
## 四、三步搭建eureka 客户端
#### 3.1 引入eureka客户端依赖
#### 4.1 引入eureka客户端依赖
```xml
<dependency>
@ -75,7 +75,7 @@ public class EurekaServerApplication {
</dependency>
```
#### 3.2 eureka 客户端配置
#### 4.2 eureka 客户端配置
```yaml
server:
@ -91,7 +91,7 @@ eureka:
defaultZone: http://localhost:8010/eureka/
```
#### 3.3 启动类上增加注解@EnableDiscoveryClient激活eureka客户端自动配置
#### 4.3 启动类上增加注解@EnableDiscoveryClient激活eureka客户端自动配置
```java
@SpringBootApplication
@ -109,4 +109,4 @@ public class EurekaClientApplication {
#### 5.1 进入注册中心控制台,查看服务注册情况
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/eureka.png"/> </div>
<div align="center"> <img src="https://github.com/heibaiying/spring-samples-for-all/blob/master/pictures/eureka.png"/> </div>