Initially, before implementing the domain model, the dependency and configuration classes need to specified. The following Maven starter dependency needs to be included:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
</dependency>
...
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
</dependency>
</dependencies>
The preceding entries import all the dependencies of the MongoDB Reactive stack and an embedded MongoDB, which can be used to store documents.