January 2020
Intermediate to advanced
428 pages
10h 34m
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 perform all CRUD actions using this simple interface declaration. Additional repository methods can be added here easily. We will learn more about this in the next chapter.
Read now
Unlock full access