111. 如何包括 Spring Cloud Gateway

要将 Spring Cloud Gateway 包含在您的项目中,请使用带有org.springframework.cloud组和工件 ID spring-cloud-starter-gateway的启动器。有关使用当前 Spring Cloud Release Train 设置构建系统的详细信息,请参见Spring Cloud Project 页面

如果包括启动器,但由于某种原因,您不希望启用网关,请设置spring.cloud.gateway.enabled=false

Tip

Spring Cloud Gateway 需要 Spring Boot 和 Spring Webflux 提供的 Netty 运行时。它不能在传统的 Servlet 容器中或作为 WAR 构建。