The persistence layer stores and retrieves application data, including creating, reading, updating, and deleting it. In a Spring app, it is the part that talks to the database. section 14.0
Spring Data reduces the code needed to build this layer. You declare repository interfaces; Spring supplies their implementations at runtime. This gives the app a common set of abstractions across persistence technologies, while the chosen Spring Data module matches the technology in use. section 14.0 section 14.1
Repository contracts can provide:
- Basic create, read, update, and delete operations through CrudRepository. section 14.5
- Pagination and sorting through PagingAndSortingRepository. section 14.5
- Custom operations, with queries specified using @Query or derived from method names. Use @Query for complex operations; data-changing queries such as INSERT, UPDATE, or DELETE require @Modifying. section 14.5
Figure 14.1 The Java ecosystem offers many various persistence technologies like Hibernate, JDBC, MongoDB, or others. Each technology has its own abstractions and class design. Spring Data offers a common abstraction layer over all these persistence technologies to simplify the use of multiple persistence technologies.

The diagram shows Spring Data’s common abstractions spanning persistence technologies with different APIs and designs. section 14.1







