1.上一编我们使用了sentinel 进行限流和熔断,这编我们整合gateway,可以先把上编的sentinel 的配置注释掉,这编主要介绍整合gateway
2.新建一个model ,cloud-gateway
3.引入gateway相关的依赖,编写pom.xml
<?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>springcloudSR6</artifactId> <groupId>com.wensen</groupId> <version>1.0-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>cloud-gateway</artifactId> <properties> <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target>