This sample application demonstrates the usage of Spring Data JPA repositories.
Important points in the code:
-
Adding dependency on Spring Data JPA: build.gradle
-
javax.persistence.EntityManager
implementation delegating to CUBAEntityManager
: SpringDataEntityManager.java -
Bean that can instantiate Spring Data repositories: Repositories.java
-
Repository interfaces for the project entities: com/company/sample/core/repositories
-
Usage of the repositories in tests and in the application code