Vikash
Vikash

Reputation: 2163

Can I deploy a Spring WebFlux application as a WAR

Here

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

I read that "War deployment is not supported for WebFlux applications". Is it only restricted for spring-boot applications or I cant do it at all with spring web flux? Assuming I don't user boot configurations and starters.

Upvotes: 0

Views: 2698

Answers (1)

Brian Clozel
Brian Clozel

Reputation: 59086

You' referring to the Spring Boot documentation here - this limitation only applies to Spring Boot.

You can deploy a Spring WebFlux application (outside of Spring Boot) as a WAR file inside a Servlet 3.1+ container. For that, the Spring Framework reference documentation says:

To deploy as a WAR to any Servlet 3.1+ container, you can extend and include AbstractReactiveWebInitializer in the WAR. That class wraps an HttpHandler with ServletHttpHandlerAdapter and registers that as a Servlet.

Upvotes: 1

Related Questions