A Spring Boot application that demonstrates reactive programming using Spring WebFlux and Project Reactor.
This project implements a reactive REST API using Spring WebFlux. It demonstrates non-blocking request processing, reactive streams, and asynchronous data handling using Reactor's Mono and Flux types.
- Java 17
- Spring Boot 3.1.3
- Spring WebFlux
- Project Reactor
- Maven
- Lombok
- JUnit 5
- Reactive REST API development
- Non-blocking request handling
- Asynchronous data processing
- Reactive streams with Flux
- Single-result publishers with Mono
- Functional endpoint routing
- Reactive request/response pipeline
- Reactive testing with Reactor Test
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Returns a reactive response from the application |
| GET | /flux |
Returns multiple values as a Flux stream |
| GET | /mono |
Returns a single value as a Mono |
| GET | /pipeline |
Demonstrates a reactive processing pipeline |
Update the endpoints above if your implementation contains different routes.
Default configuration:
server:
port: 8080
spring:
application:
name: webfluxThe application uses Spring WebFlux and Project Reactor to provide non-blocking and asynchronous request processing.
Core reactive types:
Mono<T>— emits zero or one itemFlux<T>— emits zero to many items
These types allow the application to process requests efficiently without blocking threads while waiting for operations to complete.
src/main/java/com/havefunwith/webflux
├── handler
├── router
├── service
├── model
├── repository
└── WebfluxApplication.java
This project was built as a learning project to practice Spring WebFlux concepts, including reactive programming, non-blocking APIs, functional routing, Mono, Flux, and reactive request processing.
Marlon Braga