- +91 844 9090 904
- info@maximumlearning.io
- Sector 62, Noida, 201309
This course supports both Spring Boot 2 and Spring Boot 3.
In this course, you will learn how to use Spring Data JPA and its features to reduce a lot of boilerplate code.
Throughout this course, we will build domain model entities (Product, ProductCategory, Order, OrderItems, User, Roles) and repositories for a simple e-commerce application.
Problem:
In typical three-layer Spring boot application architecture, we create three layers – Controller, Service, and DAO/Repository layer.
If we use JPA/Hibernate and then write a lot of coding while implementing DAO/Repository layer – We repeat the same code again and again so what will be the solution to reduce the boilerplate code?
Solution:
Spring Data JPA provides a solution to reduce a lot of boilerplate code.
We can use Spring Data JPA to reduce the amount of boilerplate code required to implement the data access object (DAO) layer.
Spring Data JPA is not a JPA provider. It is a library/framework that adds an extra layer of abstraction on top of our JPA provider (like Hibernate). Spring Data JPA uses Hibernate as a default JPA provider.
What you’ll learn
Learn How to Use Spring Data JPA in the Spring Boot Application
Learn How to Use JPA Annotations to Create an Entity and Map to a Database Table
Learn 4 Types of Primary key Generation Strategies – AUTO, IDENTITY, SEQUENCE, and TABLE
Learn How to Use the Lombok Library to Reduce a Boilerplate Code
Learn Spring Data JPA Repository Interfaces and Its Hierarchy
Learn Steps to Use Spring Data JPA Repository
Learn Important Spring Data JPA Repository Methods (CRUD Operations)
Learn How to Create Query Methods or Finder Methods Using Method Names
Learn How to Create JPQL and Native SQL Queries Using @Query Annotation
Learn How to Create JPQL and Native SQL Queries With Named Queries
Learn How to Implement Pagination and Sorting Using Spring Data JPA
Learn JPA/Hibernate One-to-One Mapping Using Spring Data JPA
Learn JPA/Hibernate One to Many Mapping Using Spring Data JPA
Learn JPA/Hibernate Many to Many Mapping Using Spring Data JPA
Learn JPA Cascade Types and Fetch Types (EAGER and LAZY)
Learn building domain model relationships for e-commerce projects using Hibernate ORM framework
Learn to implement Search/Filter functionality
Learn Transaction Management with Spring Data JPA and Spring Boot
Unit Testing Spring Data JPA Repository using @DataJpaTest annotation
Tools and Technologies used
Technologies:
– Java 11+
– Spring Boot
– Spring Data JPA
– Hibernate
– Lombok
– Maven
– JUnit framework
IDE:
– IntelliJ IDEA
Database:
– MySQL database
In this lecture, you will learn What is ORM (Object Relational Mapping) and who will provide an ORM in Java.
In this lecture, you will learn What is JPA (Java Persistence API) with an example.
In this lecture, you will learn What is Hibernate ORM Framework with an example.
In this lecture, you will learn the major difference between JPA and Hibernate.
In this lecture, you will learn What is Spring Data JPA and how it provides a solution to reduce the boilerplate code to develop a DAO layer.
In this lecture, you will learn Spring Data JPA internal flow from start to end.
In this lecture, you will learn the difference between Hibernate and Spring Data JPA with a diagram.
In this lecture, you will learn how to create a Spring boot project using Spring initializr and import that project in IntelliJ IDEA.
In this lecture, you will understand Spring boot starter data JPA dependency and Spring boot auto-configuration for Spring Data JPA.
In this lecture, you will learn how to create JPA entity step by step (Ex: Product Entity)
In this lecture, you will learn important JPA annotations - @Table, @Column, @GeneratedValue and @UniqueConstraint
In this lecture, you will learn important 4 types of JPA primary key generation strategies - AUTO, IDENTITY, SEQUENCE, and TABLE
In this lecture, you will learn how to use Hibernate annotations - @CreationTimestamp and @UpdateTimestamp
In this lecture, you will learn how to add Lombok library to Spring boot project to reduce boilerplate code
Quiz for this section of the lecture
Quiz for this section of the lecture
Quiz for this section of the lecture
Quiz for this section of the lecture
Quiz for this section of the lecture
Quiz for this section of the lecture
Drag file here or click the button.