Swathi Prasad
1 min readApr 13, 2020

--

We are comparing reactive (Spring WebFlux) vs non-reactive (Spring MVC) here.

CompletableFuture is async and can be non-blocking. In this example, it may not be apparent as it is just reading data. CompletableFuture is a building block for composing, combining, executing asynchronous computation steps and handling errors.

If you are already using Spring WebFlux framework, you can checkout the usage of Mono. Mono is the reactive equivalent of CompletableFuture and it is async and non-blocking.

--

--

Swathi Prasad
Swathi Prasad

Written by Swathi Prasad

Software architect and developer living in Germany. Sharing my opinion and what I learn.

No responses yet