• Professional Development
  • Medicine & Nursing
  • Arts & Crafts
  • Health & Wellbeing
  • Personal Development

Course Images

Master Hibernate and JPA with Spring Boot in 100 Steps

Master Hibernate and JPA with Spring Boot in 100 Steps

  • 30 Day Money Back Guarantee
  • Completion Certificate
  • 24/7 Technical Support

Highlights

  • On-Demand course

  • 12 hours 58 minutes

  • All levels

Description

Master JPA using Hibernate as the implementation. Learn the basics of JPA: entities, relationships, entity manager, annotations, JPQL and Criteria API. Take a step into the advanced world of JPA such as caching, performance tuning (n + 1 queries), and mapping inheritance hierarchies. Get a peek into the magic of Spring Data JPA and Spring Data REST.

Hibernate is the most popular implementation of JPA. It was the most popular ORM framework option before JPA emerged and it provides additional features on top of JPA. We will use Hibernate as the JPA implementation in this course.
The Java Persistence API provides Java developers with an API to map Java objects to relational data. In this course, you will learn about Hibernate, JPA API, JPQL (Java Persistence query language), Java Persistence Criteria API, and how you can perform ORM (Object Relational Mapping) with JPA and Hibernate.
In this course, you will learn the basics of JPA and Hibernate such as entities, relationships, inheritance mappings, and annotations. Understand approaches to querying data using JPA and Hibernate (JPQL, Criteria API, and Native Queries). Understand JPA and Hibernate Relationships in-depth such as one to one, many to one, and many to many.
Use a variety of Spring Boot Starters such as Spring Boot Starter Web, Starter Data JPA, and Starter Test. Learn the basics of performance tuning your JPA application with Hibernate - Solve N+1 Queries Issue. Learn the basics of caching such as first-level cache and second-level cache with EhCache. Understand the basics of Spring Data JPA and Spring Data REST.
By the end of this course, you will become a master in Hibernate and JPA with Spring Boot.
All the resources and code files for this course are available at https://github.com/packtpublishing/master-hibernate-and-jpa-with-spring-boot-in-100-steps

What You Will Learn

Learn the basics of JPA and Hibernate such as entities, relationships, inheritance mapping, and annotation
Approaches to querying data using JPA and Hibernate such as JPQL, Criteria API, and Native Queries
Understand JPA and Hibernate relationships in-depth such as one to one, many to one, and many to many
Learn the basic of performance tuning your JPA application with Hibernate - Solve N+1 Queries Issue
Learn the basics of caching such as first-level cache and second-level cache with EhCache
Understand the basics of Spring Data JPA and Spring Data REST

Audience

This course is for anyone who wants to learn the basics of JPA and Hibernate and understand how to build the data layer of a web application.

Approach

This is a hands-on course where you will use Spring and Spring Boot to master Hibernate, JPA (Java Persistence API), and Spring Data JPA, and implement as a real-world project.

Key Features

Cover the journey from JDBC to JPA in 18 steps * Learn JPA/Hibernate in-depth in 86 steps * Learn some useful tips and tricks for Hibernate

Github Repo

https://github.com/packtpublishing/master-hibernate-and-jpa-with-spring-boot-in-100-steps

About the Author
In28Minutes Official

Ranga Karanam is a seasoned technologist and architect with over two decades of expertise in programming, design, and architecture. He founded in28Minutes with the goal of helping students master cutting-edge cloud-native technologies such as AWS, Azure, Google Cloud, Docker, and Kubernetes. With 15 years of experience in Java programming and design, Ranga has collaborated with top banking clients worldwide. His passion for creating hands-on courses with real-world projects motivated him to develop the Step-By-Step series of courses that follow a problem-solution-based approach, with practical and real-world application examples. Ranga and his team at in28Minutes specialize in Java and related frameworks such as Spring, Spring Boot, Spring MVC, Struts, and Hibernate. They are committed to equipping learners with the skills and knowledge necessary to succeed in today's rapidly evolving technology landscape.

Course Outline

1. Introduction

1. Master Hibernate and JPA with Spring Boot

In this video, we'll be taking a quick look at the course.

2. Master Hibernate and JPA with Spring Boot - Course Overview

In this video, we'll be looking at the course overview.

3. Master Hibernate and JPA with Spring Boot - Git Repository

In this video, we'll be exploring the course Git repository for all resources and code files.

4. Master Hibernate and JPA with Spring Boot - Installing Basic Tools

In this video, we'll be installing the basic tools and setting up the environment.

5. Quick Introduction to JPA

In this video, let's see a quick introduction to JPA.

2. Introduction to Spring Boot in 10 Steps

1. Introduction to Spring Boot in 10 Steps

In this video, we'll be looking at an introduction to Spring Boot in 10 steps.

2. Step 1: Introduction to Spring Boot - Goals and Important Features

In this video, we'll be looking at the introduction to Spring Boot - goals and important features.

3. Step 2: Developing Spring Applications before Spring Boot

In this video, we'll be looking at developing Spring applications before Spring Boot.

4. Step 3: Using Spring Initializr to Create a Spring Boot Application

In this video, we'll be looking at using Spring Initializr to create a Spring Boot application.

5. Step 4: Creating a Simple REST Controller

In this video, we'll be looking at creating a simple REST controller.

6. Step 5: What is Spring Boot Auto Configuration?

In this video, we'll be looking at what is Spring Boot Auto Configuration.

7. Step 6: Spring Boot Versus Spring Versus Spring MVC

In this video, we'll be looking at Spring Boot versus Spring versus Spring MVC.

8. Step 7: Spring Boot Starter Projects - Starter Web and Starter JPA

In this video, we'll be looking at Spring Boot Starter Projects - Starter Web and Starter JPA.

9. Step 8: Overview of Different Spring Boot Starter Projects

In this video, we'll be looking at an overview of different Spring Boot starter projects.

10. Step 9: Spring Boot Actuator

In this video, we'll be looking at the Spring Boot actuator.

11. Step 10: Spring Boot Developer Tools

In this video, we'll be looking at Spring Boot developer tools.

3. Journey From Spring JDBC to JPA

1. Introduction to Journey from JDBC To JPA

In this video, let's get introduced to the journey from JDBC To JPA.

2. Step 01 - Setting Up a Project with JDBC, JPA, H2, and Web Dependencies

In this video, will cover setting up a project with JDBC, JPA, H2, and web dependencies.

3. Step 02 - Launching Up H2 Console

In this video, will cover launching up H2 console.

4. Step 03 - Creating a Database Table in H2

In this video, will cover creating a database table in H2.

5. Step 04 - Populate Data into Person Table

In this video, will populate data into the Person Table.

6. Step 05 - Implement findAll persons Spring JDBC Query Method

In this video, will implement findAll persons Spring JDBC query method.

7. Step 06 - Execute the findAll Method using CommandLineRunner

In this video, will execute the findAll method using CommandLineRunner.

8. Step 07 - A Quick Review - JDBC Versus Spring JDBC

In this video, we will see a quick review - JDBC versus Spring JDBC.

9. Step 08 - What's in the background? Understanding Spring Boot Autoconfiguration

In this video, we will see what's in the background and understand Spring Boot autoconfiguration.

10. Step 09 - Implementing findByID Spring JDBC Query Method

In this video, we will implement findByID Spring JDBC query method.

11. Step 10 - Implementing deleteByID Spring JDBC Update Method

In this video, we will implement deleteByID Spring JDBC update method.

12. Step 11 - Implementing Insert and Update Spring JDBC Update Methods

In this video, we will implement insert and update Spring JDBC update methods.

13. Step 12 - Creating a Custom Spring JDBC RowMapper

In this video, we will create a custom Spring JDBC RowMapper.

14. Step 13 - Quick Introduction to JPA

In this video, we will cover a quick introduction to JPA.

15. Step 14 - Defining Person Entity

In this video, we will define person entity.

16. Step 15 - Implementing findByID JPA Repository Method

In this video, we will implement findByID JPA repository method.

17. Step 16 - Implementing Insert and Update JPA Repository Methods

In this video, we will implement insert and update JPA repository methods.

18. Step 17 - Implementing deleteByID JPA Repository Method

In this video, we will implement deleteByID JPA repository method.

19. Step 18 - Implementing findAll Using JPQL Named Query

In this video, we will implement findAll using JPQL named query.

4. Introduction to JUnit in 5 Steps

1. Introduction to JUnit in 5 Steps

Let's take a quick look at this section in which we'll be getting introduced to JUnit in 5 steps.

2. Step 1: What is JUnit and Unit Testing?

In this video, we will cover what is JUnit and unit testing.

3. Step 2: First JUnit Project and Green Bar

In this video, we will cover the first JUnit project and Green Bar.

4. Step 3: First Code and First Unit Test

In this video, we will cover the first code and first unit test.

5. Step 4: Other Assert Methods

In this video, will cover other assert methods.

6. Step 5: Important Annotations

In this video, will cover important annotations.

5. JPA and Hibernate in Depth

1. Introduction to JPA and Hibernate in Depth

Let's take a quick look at this section in which we'll be taking an in-depth look at JPA and Hibernate.

2. Step 01 - Create a JPA Project with H2 and Spring Boot

In this video, we will create a JPA project with H2 and Spring Boot.

3. Step 02 - Create JPA Entity Course

In this video, we will create JPA entity course.

4. Step 03 - Create findByID Using JPA Entity Manager

In this video, we will create findByID using JPA entity manager.

5. Step 04 - Configuring Application Properties to Enable H2 Console and Logging

In this video, we will configure application properties to enable H2 console and logging.

6. Step 05 - Writing Unit Test for the findByID Method

In this video, we will write unit test for the findByID method.

7. Step 06 - Writing a deleteByID Method to Delete an Entity

In this video, we will write a deleteByID method to delete an entity.

8. Step 07 - Writing Unit Test for the deleteByID Method

In this video, we will write unit test for the deleteByID method.

9. Step 08 - Writing a Save Method to Update and Insert an Entity

In this video, we will write a save method to update and insert an entity.

10. Step 09 - Writing Unit Test for the save Method

In this video, we will write unit test for the save method.

11. Step 10 - Quick Review and Debugging Tips

In this video, we will cover a quick review and debugging tips.

12. Step 11 - Playing with Entity Manager

In this video, we will cover playing with the entity manager.

13. Step 12 - Entity Manager Methods - clear and detach

In this video, we will cover entity manager methods - clear and detach.

14. Step 13 - Entity Manager Methods - refresh

In this video, we will cover entity manager methods - refresh.

15. Step 14 - A Quick Review of Entity Manager

In this video, we will cover a quick review of entity manager.

16. Step 15 - JPQL - Basics

In this video, we will cover JPQL basics.

17. Step 16 - JPA and Hibernate Annotations - @Table

In this video, we will cover JPA and Hibernate annotations - @Table.

18. Step 17 - JPA and Hibernate Annotations - @Column

In this video, we will cover JPA and Hibernate annotations - @Column.

19. Step 18 - JPA and Hibernate Annotations - @UpdateTimestamp and @CreationTimestamp

In this video, we will cover JPA and Hibernate annotations - @UpdateTimestamp and @CreationTimestamp.

20. Step 19 - JPA and Hibernate Annotations - @NamedQuery and @NamedQueries

In this video, we will cover JPA and Hibernate annotations - @NamedQuery and @NamedQueries.

21. Step 20 - Native Queries - Basics

In this video, we will cover JPA and Hibernate in-depth: Native Queries - basics.

6. Establishing Relationships with JPA and Hibernate - OneToOne

1. Step 21 - Entities and Relationships - an Overview

In this video, we will cover entities and relationships - an overview.

2. Step 22 - Defining Entities - Student, Passport, and Review

In this video, we will define entities - student, passport, and review.

3. Step 23 - Introduction to One to One Relationship

In this video, we will cover an introduction to one to one relationship.

4. Step 24 - OneToOne Mapping - Insert Student with Passport

In this video, we will cover OneToOne mapping - insert student with passport.

5. Step 25 - OneToOne Mapping - Retrieving Student with Passport and Eager Fetch

In this video, we will cover OneToOne mapping - retrieving student with passport and eager fetch.

6. Step 26 - OneToOne Mapping - Lazy Fetch

In this video, we will cover OneToOne mapping - Lazy Fetch.

7. Step 27 - Transaction, Entity Manager, and Persistence Context

In this video, we will cover transaction, entity manager and persistence context.

8. Step 28 - OneToOne Mapping - Bidirectional Relationship - Part 1

In this video, we will cover OneToOne mapping - bidirectional relationship - part 1.

9. Step 29 - OneToOne Mapping - Bidirectional Relationship - Part 2

In this video, we will cover OneToOne mapping - bidirectional relationship - part 2.

7. Review with a Few FAQs about Hibernate and JPA

1. FAQ 1 - When does Hibernate send updates to the database?

In this video, we will understand FAQ 1 - When does Hibernate send updates to the database?

2. FAQ 2 - When do We Need @Transactional in a Unit Test?

In this video, we will understand FAQ 2 - When do we need @Transactional in a unit test?

3. FAQ 3 - Do Read Only Methods Need a Transaction?

In this video, we will understand FAQ 3 - Do read only methods need a transaction?

4. FAQ 4 - Why do We Use @DirtiesContext in a Unit Test?

In this video, we will understand FAQ 4 - Why do we use @DirtiesContext in a unit test?

8. Establishing Relationships with JPA and Hibernate - OneToMany and ManyToMany

1. Step 30 - ManyToOne Mapping - Designing the Database

In this video, we will cover ManyToOne mapping - designing the database.

2. Step 30 - Part 2 - ManyToOne Mapping - Implementing the Mapping

In this video, we will cover ManyToOne mapping - implementing the mapping - part 2.

3. Step 31 - ManyToOne Mapping - Retrieving and Inserting Reviews for Course

In this video, we will cover ManyToOne mapping - retrieving and inserting reviews for course.

4. Step 32 - ManyToOne Mapping - Generalizing Insert Reviews

In this video, we will cover ManyToOne mapping - generalizing insert reviews.

5. Step 33 - ManyToOne Mapping - Wrapping Up

In this video, we will cover ManyToOne mapping - wrapping up.

6. Step 34 - ManyToMany Mapping - Table Design

In this video, we will cover ManyToMany mapping - table design.

7. Step 35 - ManyToMany Mapping - Adding Annotations on Entities

In this video, we will cover ManyToMany mapping - adding annotations on entities.

8. Step 36 - ManyToMany Mapping - Fixing Two Join Tables Problem

In this video, we will cover ManyToMany mapping - fixing two join tables problem.

9. Step 37 - ManyToMany Mapping - Customizing the Join Table

In this video, we will cover ManyToMany mapping - customizing the join table.

10. Step 38 - ManyToMany Mapping - Insert Data and Write Join Query

In this video, we will cover ManyToMany mapping - insert data and write join query.

11. Step 39 - ManyToMany Mapping - Retrieve Data Using JPA Relationships

In this video, we will cover ManyToMany mapping - retrieve data using JPA relationships.

12. Step 40 - ManyToMany Mapping - Insert Student and Course

In this video, we will cover ManyToMany mapping - insert student and course.

13. Step 41 - Relationships between JPA Entities - a Summary

In this video, we will cover relationships between JPA entities - a summary.

9. Inheritance Hierarchies with JPA and Hibernate

1. Step 42 - Introduction to Inheritance Hierarchies and Mappings

In this video, we will cover an introduction to inheritance hierarchies and mappings.

2. Step 43 - JPA Inheritance Hierarchies and Mappings - Setting Up Entities

In this video, we will cover JPA inheritance hierarchies and mappings - setting up entities.

3. Step 44 - JPA Inheritance Hierarchies and Mappings - Setting Up a Repository

In this video, we will cover JPA inheritance hierarchies and mappings - setting up a repository.

4. Step 45 - JPA Inheritance Hierarchies and Mappings - Single Table

In this video, we will cover JPA inheritance hierarchies and mappings - single table.

5. Step 46 - JPA Inheritance Hierarchies and Mappings - Table Per Class

In this video, we will cover JPA inheritance hierarchies and mappings - table per class.

6. Step 47 - JPA Inheritance Hierarchies and Mappings - Joined

In this video, we will cover JPA inheritance hierarchies and mappings - joined.

7. Step 48 - JPA Inheritance Hierarchies and Mappings - Mapped Super Class

In this video, we will cover JPA inheritance hierarchies and mappings - mapped super class.

8. Step 49 - JPA Inheritance Hierarchies and Mappings - How to Choose?

In this video, we will cover JPA inheritance hierarchies and mappings - how to choose.

10. Queries with Entities using JPQL

1. Step 50 - JPQL - Courses Without Students

In this video, we will cover JPQL - courses without students.

2. Step 51 - JPQL - Courses with 2 Students and order by

In this video, we will cover JPQL - courses with at least 2 students and order by.

3. Step 52 - JPQL - Courses Like 100 Steps

In this video, we will cover JPQL - courses like 100 steps.

4. Step 53 - JPQL - Using Joins

In this video, we will cover JPQL - using joins.

11. Queries using Java API - Criteria Queries

1. Step 54 - Criteria Query - Retrieving All Courses

In this video, we will cover criteria query - retrieving all courses.

2. Step 55 - Criteria Query - Courses Like 100 Steps

In this video, we will cover criteria query - courses like 100 steps.

3. Step 56 - Criteria Query - Courses Without Students

In this video, we will cover criteria query - courses without students.

4. Step 57 - Criteria Query - Using Joins

In this video, we will cover criteria query - using joins.

12. Transaction Management

1. Step 58 - Introduction to Transaction Management

In this video, we will cover an introduction to transaction management.

2. Step 59 - Transaction Management - ACID Properties

In this video, we will cover transaction management - ACID Properties.

3. Step 60 - Understanding Dirty, Phanthom, and Non-Repeatable Reads

In this video, we will understand dirty, phanthom and non-repeatable reads.

4. Step 61 - Understand 4 Isolation Levels

In this video, we will understand 4 isolation levels.

5. Step 62 - Choosing Between Isolation Levels

In this video, we will cover choosing between isolation levels.

6. Step 63 - Implementing Transaction Management - 3 Things to Decide

In this video, we will implement transaction management - 3 things to decide.

13. Spring Data JPA and Spring Data REST

1. Step 64 - Introduction to Spring Data JPA

In this video, we will cover an introduction to Spring Data JPA.

2. Step 65 - Testing the Spring Data JPA Repository with findByID.

In this video, we will test the Spring Data JPA repository with findByID.

3. Step 66 - Spring Data JPA Repository - CRUD Methods

In this video, we will cover Spring Data JPA repository - CRUD methods.

4. Step 67 - Sorting Using Spring Data JPA Repository

In this video, we will cover sorting using Spring Data JPA repository.

5. Step 68 - Pagination Using Spring Data JPA Repository

In this video, we will cover pagination using Spring Data JPA repository.

6. Step 69 - Custom Queries Using Spring Data JPA Repository

In this video, we will cover custom queries using Spring Data JPA repository.

7. Step 70 - Spring Data REST

In this video, we will cover Spring Data REST.

14. Caching with Hibernate and JPA

1. Step 71 - Introduction to Caching and the Various Levels of Caching in Hibernate and JPA

In this video, we will see an introduction to caching.

2. Step 72 - Hibernate and JPA Caching - First-Level Cache

In this video, we will cover Hibernate and JPA caching - first-level cache.

3. Step 73 - Hibernate and JPA Caching - Basics of Second-Level Cache with EhCache

In this video, we will cover Hibernate and JPA caching - basics of second-level cache with EhCache.

4. Step 74 - Hibernate and JPA Caching - Second-Level Cache Part 2

In this video, we will cover Hibernate and JPA caching - second-level cache part 2.

15. Hibernate and JPA Tips

1. Step 75 - Hibernate Tips - Hibernate Soft Deletes - @SQLDelete and @Where

In this video, we will cover Hibernate tips - Hibernate Soft Deletes - @SQLDelete and @Where.

2. Step 76 - Hibernate Soft Deletes - Part 2

In this video, we will cover Hibernate Soft Deletes - part 2.

3. Step 77 - JPA Entity Life Cycle Methods

In this video, we will cover JPA entity life cycle methods.

4. Step 78 - Using Embedded and Embeddable with JPA

In this video, we will cover Embedded and Embeddable with JPA.

5. Step 79 - Using Enums with JPA

In this video, we will cover using Enums with JPA.

6. Step 80 - JPA Tip - Be Cautious with toString Method Implementations

In this video, we will cover JPA tip - be cautious with toString method implementations.

7. Step 81 - JPA Tip - When do You Use JPA?

In this video, we will cover JPA tip - when do you use JPA?

16. Performance Tuning Tips with Hibernate and JPA

1. Step 82 - Performance Tuning - Measure Before Tuning

In this video, we will cover performance tuning - measure before tuning.

2. Step 83 - Performance Tuning - Indexes

In this video, we will cover performance tuning - indexes.

3. Step 84 - Performance Tuning - Use Appropriate Caching

In this video, we will cover performance tuning - use appropriate caching.

4. Step 85 - Performance Tuning - Eager Versus Lazy Fetch

In this video, we will cover performance tuning - eager versus lazy fetch.

5. Step 86 - Performance Tuning - Avoid N+1 Problems

In this video, we will cover performance tuning - avoid N+1 problems.

17. A Few More FAQs

1. FAQ 5 - How to Connect to a Different Database with Spring Boot?

In this video, we will understand the answer for FAQ 5 - How to connect to a different database with Spring Boot?

2. FAQ 6 - Approach to Design Great Applications with JPA?

In this video, we will understand the answer for FAQ 6 - approach to design great applications with JPA.

3. FAQ 7 - Good Practices for Developing JPA Applications

In this video, we will understand the answer for FAQ 7 - good practices for developing JPA Applications.

18. Congratulations

1. Congratulations

In this video, let's wrap up the course.

19. Appendix - Introduction to Spring Framework in 10 Steps

1. Introduction to Spring Framework in 10 Steps

In this Appendix video, let's take a quick look on what we'll be covering in this section.

2. Step 1 - Setting up a Spring Project Using htttp://start.spring.io

In this Appendix video, we'll cover setting up a Spring project using htttp://start.spring.io

3. Step 2 - Understanding Tight Coupling Using the Binary Search Algorithm Example

In this Appendix video, we'll understand tight coupling using the binary search algorithm example.

4. Step 3 - Making the Binary Search Algorithm Example Loosely Coupled

In this Appendix video, we'll make the binary search algorithm example loosely coupled.

5. Step 4 - Using Spring to Manage Dependencies - @Component, @Autowired

In this Appendix video, we'll use Spring to manage dependencies - @Component, @Autowired.

6. Step 5 - What is Happening in the Background?

In this Appendix video, we'll cover what is happening in the background.

7. Step 6 - Dynamic auto wiring and Troubleshooting - @Primary

In this Appendix video, we'll cover dynamic auto wiring and troubleshooting - @Primary.

8. Step 7 - Constructor and Setter Injection

In this Appendix video, we'll cover constructor and setter injection.

9. Step 8 - Spring Modules

In this Appendix video, we'll cover Spring modules.

10. Step 9 - Spring Projects

In this Appendix video, we'll cover Spring projects.

11. Step 10 - Why is Spring Popular?

In this Appendix video, we'll see why Spring is popular.

Course Content

  1. Master Hibernate and JPA with Spring Boot in 100 Steps

About The Provider

Packt
Packt
Birmingham
Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and i...
Read more about Packt

Tags

Reviews