Repository Layer
Learn how to create a class that represents the domain object and a reactive repository.
We'll cover the following...
We'll cover the following...
Let’s start from the source of our Reactive Data Stream: MongoDB. We need to create a class that represents the domain object, Quote, and a Spring Data Repository to collect and map this data to Java objects.
The Quote class
Below, you can find the Quote class implementation. It just contains an identifier, the book title, and the quote contents.
Reactive repository with Spring 5 and Spring data
Creating a basic reactive repository is as simple as creating a classic one in Spring Data: you just need to create an interface that extends ReactiveCrudRepository, which is the reactive version of CrudRepository. You’ll then have access to default ...