June 2017
Intermediate to advanced
496 pages
14h 4m
English
A custom repository can be created by extending the repository marker interface. In the following example, we extend the repository interface with two methods--findAll and count:
import org.springframework.data.repository.Repository; public interface TodoRepository extends Repository<Todo, Long> { Iterable<Todo> findAll(); long count(); }
A few important things to note are as follows:
Read now
Unlock full access