To enable us to build web-based services, SpringWebFlux offers the following programming models:
- Annotations: Annotations were originally part of the SpringMVC stack. These annotations are also supported by the SpringWebFlux framework. This is the easiest way of getting started with the SpringWebFlux stack.
- Functional endpoints: This model allows us to build Java 8 functions as web endpoints. The application can be configured as a set of routes, handlers, and filters. It then enables passing all of these as lambda functions in order to build the application in a functional paradigm.
In order to work with SpringWebFlux, we need to configure an underlying server. While writing this book, Netty, Tomcat, Jetty, ...