To connect to the ReactiveMongo database, Spring Boot provides a starter project--Spring Boot Reactive MongoDB Starter. Let's add this to our the pom.xml file:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb- reactive</artifactId> </dependency>
The spring-boot-starter-data-mongodb-reactive starter brings in the spring-data-mongodb, mongodb-driver-async, and mongodb-driver-reactivestreams dependencies. The following snippet shows the important dependencies in the spring-boot-starter-data-mongodb-reactive starter:
<dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-mongodb</artifactId> <exclusions> <exclusion> ...