1:搭建Eureka
(1):server端

spring:
application:
name: eureka-server
server:
port: 20000
eureka:
client:
fetch-registry: false #表示是否将自己注册到Eureka Server ,默认为true
register-with-eureka: false #表示是否将自己注册到Eureka Server,默认为true,由于当前应用就是Eureka-Server 因此设为false
instance:
hostname: localhost
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
@SpringBootApplication
@EnableEurekaServer
public class EuerkaServerApplication {
public static void main(String[] args) {
SpringApplication.run(EuerkaServerApplication.class, args);
}
}

(2):client端





2:核心功能:
(1):注册中心UI界面解读
(2):心跳检测
(3):服务剔除
(4):服务续约
(5):服务自保
(6):服务下线
3:注册中心高可用