Repositories

Spring offers a Repository interface for implementing the repository pattern.

In most cases these repositories will work without the need of a concrete implementation, Spring will generate the final repository from the interface.

public interface EntityRepository extends JpaRepository<Entity, EntityKey> {

}

In this case the interface used is an extension specific for JPA.

Base Repositories

@NoRepositoryBean
public interface BaseRepository extends JpaRepository<Entity, EntityKey>

More Information

Last updated