【问题标题】:Can I deploy a Spring WebFlux application as a WAR我可以将 Spring WebFlux 应用程序部署为 WAR
【发布时间】:2019-07-05 22:43:37
【问题描述】:

这里

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file

我读到“WebFlux 应用程序不支持战争部署”。它是否仅适用于 spring-boot 应用程序,或者我根本无法使用 spring web 助焊剂?假设我不使用引导配置和启动器。

【问题讨论】:

    标签: java spring-boot spring-mvc war spring-webflux


    【解决方案1】:

    您在这里指的是 Spring Boot 文档 - 此限制仅适用于 Spring Boot。

    您可以将 Spring WebFlux 应用程序(在 Spring Boot 之外)部署为 Servlet 3.1+ 容器内的 WAR 文件。为此,the Spring Framework reference documentation says

    要作为 WAR 部署到任何 Servlet 3.1+ 容器,您可以扩展和 在 WAR 中包含 AbstractReactiveWebInitializer。该类包装了一个 HttpHandler 与 ServletHttpHandlerAdapter 并将其注册为 小服务程序。

    【讨论】:

    • Spring boot webflux应用在tomcat中部署为WAR的解决方法是什么?
    猜你喜欢
    • 1970-01-01
    • 2013-01-27
    • 1970-01-01
    • 2015-04-18
    • 2021-08-17
    • 2021-12-28
    • 2017-12-13
    • 2021-12-02
    • 2011-07-17
    相关资源
    最近更新 更多