Spring Data encapsulate multiple modules:
- Spring Data JDBC
- Spring Data LDAP
- Spring Data MongoDB
- Spring Data Redis
- Spring Data JPA
Spring Data JPA
Interfaces
JDBC – Old java api. Spring JDBC – Spring abstraction to JDBC (JDBC Template) Spring Data JPA -Spring JPA supported implementation. Spring Data JDBC – New asynchronous implementations R2BC – Reactive streams solution. |
Persistence
Is the first-level cache where all entities are fetched from database or saved to, there are two types:
- transaction scope persistence context
- extended scope persistence context
Layers of persistence in Spring JPA
JDBC → JDBC Template → JPA (Entity Manager) → Spring Data JPA (Repository)