March 2018
Intermediate to advanced
380 pages
9h 23m
English
In the src/main/java/com/mycompany/store/repository folder, you will find the entity repository service. Open ProductRepository.java:
@Repositorypublic interface ProductRepository extends JpaRepository<Product, Long> {}
The repository service is just an empty interface that extends the JpaRepository class. Since it is a Spring Data repository, the implementation is automatically created, allowing us to do all CRUD actions using this simple interface declaration. Additional repository methods can be added here easily. We will see about that in the next chapter.