Skip to main content
grasp.study
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Spring Boot, Distributed Systems, DevOps
·
Module 4
Data Persistence with JPA and PostgreSQL
1
Local PostgreSQL with Docker for Spring Applications
Run a PostgreSQL instance locally using Docker and connect the Spring application to it via `application.yml` properties.
2
JPA Entities: Defining with `@Entity`, `@Id`, and Schema Generation
Define a JPA entity with `@Entity` and `@Id`, and configure automatic schema generation.
3
Spring Data JPA: Basic CRUD Operations
Implement a Spring Data JPA repository interface to get basic CRUD operations for an entity.
4
Mastering One-to-Many and Many-to-One Relationships
Define `@OneToMany` and `@ManyToOne` relationships between entities (e.g., User and Post).
5
Custom Repository Queries with Derived Methods and JPQL
Write custom repository queries using both derived query method names and the `@Query` annotation with JPQL.
6
Manual JPA Entity to DTO Mapping
Implement a manual mapping strategy to convert between JPA entities and DTOs in the service layer.
Solving N+1 Query Problems
Identify and fix an N+1 query problem by observing SQL logs and applying an entity graph or JPQL join fetch.
Previous module
Building REST APIs with Spring MVC
Next module
Transactions, Validation, and Error Handling