Spring Framework has been supporting MongoDB, Apache Cassandra, and Redis when it comes to NoSQL data transactions. Each data repository has its own Spring Data module that developers can use without much effort on the configuration side. Spring 5, with the help of Spring Boot 2.0, can still provide support to MongoDB, and both non-blocking and Reactive repository transactions. But this recipe is all about implementing Reactive Spring Data MongoDB repository properties.
Again, open ch12-mongodb
without removing previous Spring Data JPA reactive components.
Let us not use the dedicated Spring Data MongoDB to implement Reactive repository transactions:
- Add the following Reactive Spring Data MongoDB dependency in the
pom.xml
file:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb-reactive </artifactId> </dependency>...