Demo project for Spring Boot(Spring 5), Reactive Web and Reactive Data MongoDB
- JDK 1.8+
- MongoDB installed
- Reactive rest service
- https://docs.spring.io/spring/docs/5.0.0.BUILD-SNAPSHOT/spring-framework-reference/html/web-reactive.html
Spring-webflux alongside with Reactor Netty and Reactive-Stream enabling reactive capabilities to the entire stack:
- Non-Blocking network operations on the jvm
- Support for asynchronous stream processing with non-blocking backpressure
Providing interface to interact with Spring Data Mongo in a reactive way, here we're using:
- ReactiveMongoRepository in lieu of MongoRepository
- ReactiveMongoTemplate and not MongoTemplate as before Spring 5
- EnableReactiveMongoRepositories instead of EnableMongoRepositories
- AbstractReactiveMongoConfiguration and not AbstractMongoConfiguration
- Core files with spring-boot
- MongoDB configurations
- Article's Model, Repository and Service
- Article's CRUD operations
- Build a reactive rest API with Annotation-based Programming Model
- Article rest service tests
- Refactor the API to use a Functional Programming Model(HandlerFunction + RouterFunction)
- Start mongod process
./mvnw clean install
./mvnw spring-boot:run