New in Spring 5: Functional Web Framework
summary
Spring 5 adds a parallel, functional web API that maps requests to RouterFunction and responds with Mono/Flux streams; the demo implements a Person repository (Mono for single, Flux for all) and handler functions that build immutable ServerRequest/ServerResponse objects, nest routes, apply composable predicates and filters, and run on Spring Boot or standalone on Reactor Netty/Tomcat/Undertow. It avoids reflection, favors Java 8 method references and immutability, and includes test support via WebTestClient; example code is on GitHub.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:39About Arjen
- 1:43I do like annotations...
- 2:16but there are downsides
- 4:35Design Goals
- 7:19Immutability
- 8:40First-class Functions
- 10:28Pure Functions
- 17:23Server Request
- 18:47Server Response
- 31:27RouterFunction
- 33:06Request Predicates
- 45:38Handler Filter Function
- 46:52Running Router Functions








