Spring Boot with WebFlux and vaadin?

Is it possible to use vaadin with WebFlux in the same project?

Not really Vaadin related but simple boot “problem” https://stackoverflow.com/a/53883539

I found this example which is quite old. There it seams to work. https://www.youtube.com/watch?v=7Mr_pQc_rxA. But it does not work with current spring 3.1.6.

The question is… what do you wanna archive? Call an external service reactive and stream those results to the Vaadin UI? Use Webclient or e.g. the new virtual threads

Do you wanna also serve webflux content to end-users directly with e.g. a controller? Use Hilla or I would recommend to create another Microservice just for that purpose to improve maintainability in the long run

My goal is to add a simple UI to an existinge Spring Application with a Rest API in WebFlux. As for now I have to create a new Spring Application with Vaadin and call the Rest API from there.

If you already have an Rest API with Webflux and Netty, it’s not really possible to add Vaadin in there because Netty is no servlet container, see link from above - if both container (reactive and non-reactive) are present, boot is going to choose the servlet approach and your REST API could be broken in the worst case.

Thanks for the info. I better understand now, why this is not working. So i will make two projects. One with WebFlux and one with vaadin.