1.搭建网关模块
2.引入依赖:starter-gateway
3.编写启动类
4.编写配置文件
5.启动测试
依赖所需要导入的代码
<!--引入gateway网关-->
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-boot-starter-gatway</artifactId>
</dependency>
<!--eureka-client--->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
</dependencies>