As we learned in the introduction, Spring Data provides a common approach to connect different data stores. Spring Data provides basic abstraction through the Repository interface. The Repository interface is the core interface of Spring Data. Basic repositories provided by Spring Data are as follows:
- CrudRepository provides basic CRUD operations
- PagingAndSortingRepository provides methods to do the pagination and sorting of records
- JpaRepository provides JPA-related methods, such as flush and insert/update/delete in a batch, and so on
Repository, in Spring Data, eliminates the implementation of DAOs and templates such as HibernateTemplate or JdbcTemplate. Spring Data is so abstract that we don't even need to write ...