4.83 out of 5
4.83
3 reviews on Udemy

Mastering Spring Data JPA: From Basics to Advanced

The full guide to master Spring Data JPA step by step
Instructor:
BOUALI Ali
36 students enrolled
English [Auto]
Setting up your development environment
Exploring Spring Data JPA fundamentals
Mastering repositories and the entity lifecycle
Unraveling entity relationships
Understanding inheritance
Leveraging embedded IDs and entities
Querying data
Named queries
Specification

Course description

Embark on a comprehensive journey through the world of Spring Data JPA, and become an expert in creating high-performance, data-driven applications. This in-depth course is tailored for developers seeking to master Spring Data JPA, covering everything from basic concepts to advanced techniques. By enrolling in this course, you will unlock the full potential of Spring Data JPA and gain the confidence to tackle complex real-world challenges.

Key topics covered in this course include:

  1. Setting up your development environment: Learn how to connect to MySQL and PostgreSQL databases using Docker, ensuring a smooth and practical learning experience.

  2. Exploring Spring Data JPA fundamentals: Dive into the core concepts of Spring Data JPA, including entities, primary keys, generation types, columns, and tables. Get hands-on experience through practical examples that solidify your understanding of these essential annotations.

  3. Mastering repositories and the entity lifecycle: Understand the repository hierarchy, entity lifecycle, and how to leverage the power of Spring Data JPA to manage your data efficiently.

  4. Unraveling entity relationships: Delve into various relationship types, such as one-to-one, one-to-many, and many-to-many, while learning best practices for modeling and managing complex relationships between entities.

  5. Understanding inheritance: Gain a deep understanding of inheritance strategies in Spring Data JPA and how to model and query hierarchical data effectively.

  6. Leveraging embedded IDs and entities: Discover how to use embedded IDs and entities to model composite primary keys and embeddable types, enhancing the reusability and maintainability of your code.

  7. Querying data: Master the art of querying data using various techniques, including JPQL, native SQL queries, and the Criteria API.

  8. Named queries: Learn how to use named queries for better organization, maintainability, and performance optimization.

  9. Specification: Unlock the full potential of Spring Data JPA Specifications to create dynamic and type-safe queries, which can be combined and reused for ultimate flexibility and maintainability.

This comprehensive course is designed to provide you with the knowledge and skills necessary to excel in your career as a Spring Data JPA developer. With a balanced mix of theory, hands-on examples, and best practices, you will be well-equipped to create efficient and scalable applications using Spring Data JPA. Enroll today and take the first step towards becoming a Spring Data JPA expert!

Bootstrap the course

1
Setup Postgres DB server (Docker image)
2
Setup MySQL DB server (Docker image)
3
Create a new Spring boot project
4
Setup the DB and create a new schema (Postgres)
5
Setup the DB and create a new schema (MySQL)
6
Connect the application to the database (Postgres)
7
Connect the application to the database (MySQL)
8
The persistence project we will build

Introduction to Spring Data JPA

1
Hibernate VS Spring Data JPA
2
Create the first java Class
3
Transform the java Class to an @Entity
4
@Id annotation
5
@GeneratedValue annotation
6
Strategy AUTO
7
@SequenceGenerator annotation
8
@TableGenerator annotation
9
@Column annotation overview
10
Best usages of @Column
11
Have more control over your entity using @Table

Repositories

1
Repositories overview
2
Deep understanding of Repositories
3
Discover the repositories as code
4
Create your first Repository
5
Create a command line runner
6
Insert some data into the database
7
Entity lifecycle

Spring Data JPA Relationships

1
Why creating relationships between entities
2
The difference between unidirectional and bidirectional relationship
3
Create the course entity
4
Create the section entity
5
Create the lecture entity
6
Create the resource entity
7
Many to many relationship
8
One to many
9
One to many section and lecture
10
One to one relationship
11
Check if your code is correct

Playing with Inheritance

1
Inheritance overview
2
Inheritance VS Composition
3
@MappedSuperclass
4
Create the child classes
5
Single table strategy
6
Single table strategy - Discriminator Values
7
Test the single table strategy strategy
8
Joined table strategy
9
Table per class strategy
10
Polymorphic Queries

Embedded entities & ID

1
Embedding Overview
2
@EmbeddedId
3
Use the embedded ID
4
Test the embedded ID
5
Create Embedded Address class
6
@Embaddable annotation

Querying data

1
Derived query methods explained
2
FindAllBy methods explained
3
Play with FindBy method
4
Add Java Faker dependency
5
Insert fake data
6
Exercice
7
Update data
8
Update data using @Modifiying

Named queries

1
Definition and advantages of named queries
2
Fetch data with @NamedQuery
3
Update data with @NamedQuery
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.8
4.8 out of 5
3 Ratings

Detailed Rating

Stars 5
2
Stars 4
1
Stars 3
0
Stars 2
0
Stars 1
0