© Marten Deinum 2018
Marten DeinumSpring Boot 2 Recipeshttps://doi.org/10.1007/978-1-4842-3963-6_5

5. Spring WebFlux

Marten Deinum1 
(1)
Meppel, Drenthe, The Netherlands
 

5.1 Developing a Reactive Application with Spring WebFlux

Problem

You want to develop a simple reactive web application with Spring WebFlux to learn the basic concepts and configurations of this framework.

Solution

The lowest component of Spring WebFlux is the HttpHandler , an interface with a single handle method.
public interface HttpHandler {
  Mono<Void> handle(ServerHttpRequest request, ServerHttpResponse response);
}

The handle method returns a Mono<Void> , which is the reactive way of saying it returns void. It takes both a ServerHttpRequest and ServerHttpResonse from the org.springframework.http.server.reactive ...

Get Spring Boot 2 Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.