Below are the differences between CrudRepository
and JpaRepository
as:
CrudRepository
CrudRepository
is a base interface and extends the Repository
interface.CrudRepository
mainly provides CRUD (Create, Read, Update, Delete) operations.saveAll()
method is Iterable
.CrudRepository
.JpaRepository
JpaRepository
extends PagingAndSortingRepository
that extends CrudRepository
.JpaRepository
provides CRUD and pagination operations, along with additional methods like flush()
, saveAndFlush()
, and deleteInBatch()
, etc.saveAll()
method is a List
.JpaRepository
.