The Spring Data project allows application programmers to work with data stores using a consistent interface that makes use of an abstraction called Repository
. A Spring Data Repository
is modeled after the Repository pattern made popular by domain-driven design. Spring Data provides a central Java interface named Repository
that subprojects can extend to provide features specific to data stores.
In addition to the Repository
interface, Spring Data also provides two more core interfaces - CrudRepository
that defines the contract for basic CRUD (create, read, update and delete) functionality; and PagingAndSortingRepository
that extends CrudRepository
by defining a contract for pagination and sorting.
These three core interfaces (Repository
, CrudRepository
and PagingAndSortingRepository
) ensure that: