0Pricing
Spring Boot 4 Microservices & REST APIs · Lesson

Defining Entities & Repositories

Create JPA entities to map to database tables and define repository interfaces for data access.

Welcome to Data Persistence

In this lesson, we'll learn how to connect your Java application to a database using Spring Boot. This is called data persistence, meaning your data lives on even after your app stops.

We'll focus on two core concepts:

  • Entities: Your Java objects that map to database tables.
  • Repositories: Interfaces that provide easy ways to interact with your entities and the database.

What's a JPA Entity?

A JPA Entity is a plain Java class that represents a table in your relational database. Each instance of this class corresponds to a row in that table.

The Java Persistence API (JPA) is a standard for managing relational data in Java applications. Spring Data JPA builds on this to simplify database interactions even further.

All lessons in this course

  1. Integrating H2 Database & JPA
  2. Introduction to Spring Data JPA
  3. Creating Entities & Repositories
  4. Defining Entities & Repositories
  5. CRUD Operations with REST
  6. Performing CRUD Operations
← Back to Spring Boot 4 Microservices & REST APIs