如何包含 Spring Cloud Gateway Server MVC
若要在项目中包含 Spring Cloud Gateway Server MVC,请使用 group ID 为 org.springframework.cloud
且 artifact ID 为 spring-cloud-starter-gateway-mvc
的 starter。有关使用当前 Spring Cloud Release Train 设置构建系统的详细信息,请参阅 Spring Cloud 项目页面。
如果您包含了 starter,但不想启用网关,请设置 spring.cloud.gateway.mvc.enabled=false
。
Spring Cloud Gateway Server MVC 构建于 Spring Boot 和 Spring WebMvc.fn 之上。因此,当您使用 Spring Cloud Gateway Server MVC 时,许多异步或响应式库可能不适用。 |
Spring Cloud Gateway Server MVC 可与传统的 Servlet 运行时(例如 Tomcat 和 Jetty)配合使用。 |