Using Spring Boot Weblfux with Embedded Tomcat

I am trying to use WebFlux reactive types in a new Spring Boot Application. I used initializr at https://start.spring.io and chose version 2.0.0-SNAPSHOT. I added a web reactive dependency and everything I did worked great. It was a really solid POC, the goal was how to use these types to modernize our APIs. To do this, we planned to slowly replace every part of the blocking and / or synchronous process and replace it with a non-blocking alternative implementation.

The problem I'm running into is when I try to turn my POC into something closer to the services we have in production, a lot of things don't seem to work. Now I understand that webflux is not GA yet, and that I shouldn't expect full reactive support from all other Spring projects. However, I remember when webflux was still called web reactive that you could run on grown / jetty / netty / tomcat / etc, but now when I use webflux starter everything defaults to netty and I can't see how the docs is calling how to change this to embedded tomcat which our other services are currently using.

Can spring-boot-starter-webflux be used with other app containers, or do I now need to manually load webflux to work with something other than netty?

+3


source to share


1 answer


You can exclude spring-boot-starter-reactor-netty

from dependency spring-boot-starter-webflux

and use spring-boot-starter-tomcat

, spring-boot-starter-undertow

or spring-boot-starter-jetty

.



+4


source







All Articles