如何 включити Spring Cloud Gateway Server MVC
若要在您的專案中 включити Spring Cloud Gateway Server MVC,請使用群組 ID 為 org.springframework.cloud
和 artifact ID 為 spring-cloud-starter-gateway-mvc
的 starter。請參閱 Spring Cloud 專案頁面,以取得關於設定您的建置系統以使用目前的 Spring Cloud Release Train 的詳細資訊。
如果您 включити 了 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)搭配使用。 |