1.Eureka基础知识
2.单机Eureka构建
1.EurekaServer服务端安装
2.支付微服务8001入驻进eurekaServer
eureka的自我保护机制
3.订单微服务80入驻进eurekaServer
3.Eureka集群搭建步骤
1.Eureka集群原理说明
2.Eureka集群环境构建
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>springcloud2020</artifactId>
<groupId>com.atguigu.springcolud</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-eureka-server7002</artifactId>
<dependencies>
<!--eureka-server-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<!--引入自己定义的api通用包。可以使用Payment支付Entity-->
<dependency>
<groupId>com.atguigu.springcolud</groupId>
<artifactId>cloud-api-commons</artifactId>
<version>${project.version}</version>
</dependency>
<!--boot web actuator-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!--一般为通用配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
3.订单支付两微服务注册进Eureka集群
4.支付微服务集群配置
从8001复制
修改8001和8002的controller
4.actuator微服务信息完善
5.服务发现Discovery
修改8001,8002的Controller
修改8001,8002的主启动类
6.Eureka自我保护
1.Eureka自我保护理论知识
2.怎么禁止自我保护
修改7001,7002的yml
修改8001,8002yml
关闭8001,直接剔除