This project is a RESTful API built with Spring Boot and WebFlux. It implements full CRUD operations over products stored in MongoDB, supports photo uploads via multipart requests, and follows a fully reactive architecture using functional handlers and routes.
- 🔁 Reactive programming with Spring WebFlux
- 📦 Full CRUD for products
- 🗂️ Reactive MongoDB with
ReactiveMongoRepository - 🖼️ Multipart file upload support
- ✅ Data validation using
@Valid - 🧩 Functional routing with
Handler + RouterFunction - 📂 Clean architecture with DAO, Service, and Handler layers
- Java 22+
- Spring Boot 3.3.2
- Spring WebFlux
- MongoDB
- Reactive Mongo Driver
- WebClient
- Maven
# 1. Clone the repository
git clone https://github.com/freyderdev/spring-boot-webflux-apirest.git
cd spring-boot-webflux-apirest
# 2. Make sure MongoDB is running locally on port 27017
# 3. Run the app
./mvnw spring-boot:runThe API will be available at:
http://localhost:8080/api/v2/productos
GET /api/v2/productos→ list all productsGET /api/v2/productos/{id}→ get product by IDPOST /api/v2/productos→ create new productPUT /api/v2/productos/{id}→ update productDELETE /api/v2/productos/{id}→ delete productPOST /api/v2/productos/upload→ upload photo and data
Freyder Otálvaro
GitHub
Colombia 🇨🇴