Spring Data JPA Masterclass

1-3 Days

Dates and Booking

Description

This training provides you with a comprehensive overview of Spring Data JPA - practical and tailored to your needs. The choice is yours:

  • Book the 3-day Masterclass for a comprehensive all-in-one package. This consists of:

    • Learn the basics of JPA in the 1-day workshop “JPA Basics “.

    • Learn all about the details of using Spring Data JPA in the 2-day training “Spring Data JPA “.

The 3-day Spring Data JPA Masterclass consists of the 1-day training "JPA Basics" and the 2-day training "Spring Data JPA"

JPA Basics(1 day)

Wouldn’t it be great if you could focus on application logic during development instead of bothering with JDBC-based database accesses? What if you could read and edit your data via properties of Java objects without having to write an SQL statement?

You can do that using Jakarta Persistence (formerly JPA), one of the most popular Java specifications. The implementations of the standard map database tables to entity classes using annotations. These can then be used to read records from the database and convert them to Java objects, and to automatically store changes in the database.

During this workshop, I will use lots of examples and exercises to show you how to do all of this and why you should still know SQL.

Spring Data JPA (2 days)

Spring Data JPA seamlessly integrates Jakarta Persistence (formerly JPA) into the Spring stack and provides many features that make Jakarta Persistence easier to use and improve developer productivity. That’s why many teams prefer using Spring Data JPA over plain Jakarta Persistence or any of its implementations.

During this workshop, I will use many examples to show you how to get the most out of Spring Data JPA, which features simplify your development and which often cause trouble in production.

Agenda

JPA Basics(1 day)

At the beginning of the training, I will explain all the basic terms, the required dependencies and configurations of Jakarta Persistence.

Building on this, we will model your first entities and use them to create, edit and delete records in a database. You will learn:

  • how to use annotations to map entities and simple properties,

  • how to use the lifecycle model to automatically save new entities, persist changes and delete entities,

  • how to define relationships between entities with the help of annotations.

After you learned about basic mappings, we will take a closer look at JPQL. This is an SQL-like query language that enables you to define queries based on your entities.

Spring Data JPA (2 days)

During this training, you will work with lots of examples to learn more about Spring Data JPA’s advanced features and concepts.

You learn how to implement easy-to-use repositories by

  • Extending Spring Data JPA’s standard repositories,

  • Building project-specific standard repositories, and

  • Adding your own method implementations to your repository.

You learn how to query data efficiently by

  • Letting Spring Data JPA derive the statement from a method name,

  • Defining your own JPQL or native query statement,

  • Finding entities that match an example,

  • Calling a stored procedure,

  • Defining a query based on a specification,

  • Using pagination and scrolling on huge result sets,

  • Fetching associated entities, and

  • Adjusting the projections to your use case.

Finally, we will discuss how to create and migrate your database schema automatically with Spring Boot, Flyway or Liquibase.

Your Benefits

Create customized repositories that meet the needs of your application.

Use the best query option to fetch your data efficiently.

Create a maintainable and performant persistence layer.

Map entity classes to database tables.

Create database-independent queries with JPQL.

Model relationships between entities.

Audience

Software developers with little or no experience with Jakarta Persistence, Hibernate and EclipseLink.

*If you only want to participate in the 2-day training “Spring Data JPA”, you should already be familiar with the concepts of Jakarta Persistence and Hibernate.

Training Objectives

Learn how to create your own object-rational mappings and persist them in the database.

Use Spring Data JPA to read and write data efficiently.

Understand the different query options and know when each is most appropriate.

Know the most common options for creating and updating your database schema.

Your Trainers

Thorben Janssen

Thorben Janssen

JPA & Hibernate

  • Advanced Hibernate
  • Hibernate Performance Tuning (Online)
  • Spring Data JPA Masterclass

Thorben Janssen is a consultant and trainer who helps teams build better persistence layers with JPA and Hibernate. He’s the author of the Amazon best-selling book “Hibernate Tips”, which offers More than 70 solutions to common Hibernate problems, and an international speaker with more than 20 years of experience in JPA and Hibernate. He also writes about various persistence topics on thorben-janssen.com and helps developers improve their skills in the Persistence Hub (persistence-hub.com).

Online Courses

On-site Courses

Dates by Request

Event ticketing software by pretix

In-House Training

You can also book this training as an in-house training course exclusively for your team. Please use the enquiry form for more details.

Enquire now