We have played with the Spring Data JPA project, and we have seen how easy it can be. We learned how to configure the database connections to persist the real data on the Postgres database. Now, we will create the final solution for the data access layer for our application. The final solution will use MongoDB as a database and will use the Spring Data MongoDB project, which provides support for MongoDB repositories.
We will see some similarities with the Spring Data JPA projects. It is amazing because we can prove the power of Spring Data abstractions in practice. With a couple of changes, we can move to another database model.
Let's understand the new project and put it into practice in the following sections.