Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Mastering Spring Data JPA: From Basics to Advanced
Rating: 4.4 out of 5(12 ratings)
71 students

Mastering Spring Data JPA: From Basics to Advanced

The full guide to master Spring Data JPA step by step
Created byBouali Ali
Last updated 4/2023
English
English [Auto],Korean [Auto],

What you'll learn

  • 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 content

8 sections64 lectures4h 49m total length
  • Setup Postgres DB server (Docker image)5:05

    Set up a postgres database with docker by running the postgres image in detached mode, mapping a persistent volume, configuring POSTGRES_USERNAME and POSTGRES_PASSWORD, and exposing port 5432.

  • Setup MySQL DB server (Docker image)2:29

    install a MySQL database with Docker by running a detached container, mount a persistent volume at /var/lib/mysql/data, and set MYSQL_ROOT_PASSWORD while exposing the database port.

  • Create a new Spring boot project3:46

    Create a spring boot project via spring initializr, selecting maven and java, with groupId com.alibux coding and artifact jpa, adding Spring Data JPA, postgres driver, mysql driver, and Spring Web.

  • Setup the DB and create a new schema (Postgres)4:23

    Connect to a PostgreSQL database using the IntelliJ database tool, download the driver, test the connection, and create a new schema named data_jpa under the public schema.

  • Setup the DB and create a new schema (MySQL)1:52

    Learn to set up a MySQL data source in your IDE, configure host and port, test the connection, and ensure your container is running to access the database.

  • Connect the application to the database (Postgres)9:20

    Configure a Spring Data JPA project to connect to a PostgreSQL database using application.yaml, set ddl auto to create drop, enable show sql, and test the connection locally.

  • Connect the application to the database (MySQL)5:53

    Configure spring to connect to a MySQL database by creating a mysql profile, updating jdbc url to include create database if not exists, and running with the mysql profile.

  • The persistence project we will build5:53

    Explore a detailed e-learning database schema with courses, authors, sections, lectures, and 1-to-1 resources, including video and text types through resource inheritance, and learn to implement advanced searches and transactions.

Requirements

  • No programming experience is required

Description

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!

Who this course is for:

  • Beginners
  • Professionals looking to deeply understand Spring Data JPA