跳到主要内容
版本:5.0.1

如何集成 Spring Cloud Gateway Server Web MVC

DeepSeek V3 中英对照 How to Include Spring Cloud Gateway Server Web MVC

要在项目中包含 Spring Cloud Gateway Server Web MVC,请使用组 ID 为 org.springframework.cloud、工件 ID 为 spring-cloud-starter-gateway-server-webmvc 的启动器。有关使用当前 Spring Cloud Release Train 设置构建系统的详细信息,请参阅 Spring Cloud 项目页面。

如果你包含了启动器,但不想启用网关,请设置 spring.cloud.gateway.server.webmvc.enabled=false。

important

Spring Cloud Gateway Server MVC 构建于 Spring Boot 和 Spring WebMvc.fn 之上。因此,当您使用 Spring Cloud Gateway Server MVC 时,许多异步或响应式库可能不适用。

important

Spring Cloud Gateway Server MVC 可与传统的 Servlet 运行时(如 Tomcat 和 Jetty)协同工作。