Once the whole infrastructure and JPA mappings are done, we can add our repositories to our projects. In the Spring Data project, there are some abstractions, such as Repository, CrudRepository, and JpaRepository. We will use the JpaRepository because it supports the paging and sorting features.
Our repository will be pretty simple. There are a couple of standard methods, such as save(), update(), and delete(), and we will take a look at some DSL query methods which allow developers to create custom queries based on attribute names. We created an AbstractRepository to help us to store the objects in memory. It is not necessary anymore. We can remove it.
Let's create our first JPA repository: ...