|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/hibernate-and-spring-data-jpa-beginner-to-guru/
课程评论:没有评论
课程名称:Hibernate 和 Spring Data JPA:初学者到专家 课程概述:Hibernate 是 Spring Data JPA 的默认 JPA 实现。本课程需要使用 Java 17 和 Spring Boot 3。JPA 代表 Java 持久化 API,是用于处理关系型数据库的常见 Java API。Spring Data JPA 是建立在 JPA API 规范之上的抽象层,使得处理数据库实体变得高效,消除了大量冗余和仪式性的代码,帮助开发者专注于业务逻辑。然而,这种高效的抽象可能会让数据库访问变得复杂。虽然开发者可能掌握如何使用 Spring Data JPA,但对 JDBC 和 Hibernate 的复杂性却了解不多。 在课程的开始部分,您将通过基础示例学习如何使用 Spring Data JPA,体验在 H2 内存数据库中的操作,并逐步理解 Hibernate 的抽象交互过程。课程重点关注关系型数据库,尤其是 MySQL,这是一款全球最受欢迎的开源关系数据库。您将学习如何配置 Spring Boot,以便使用 H2 内存数据库进行测试,并对 MySQL 数据库进行集成测试,这也是一个常见的实际应用示例,充分利用 Spring 和 Hibernate 的强大功能,提供灵活的环境。 在建立了持久化数据库后,课程将进一步探索数据库迁移工具的使用,Liquibase 和 Flyway 是两种非常流行的数据库迁移工具,Spring Boot 支持这两个选项,您将学习这两种工具及最佳的数据库安全实践。通过建立 MySQL 数据库、使用 Spring Boot 集成测试和自动化数据库迁移,我们可以运用测试驱动开发探索 JDBC 和 Hibernate 的功能。 您将在课程中学习到: - DAO 模式及其在 JDBC、Spring 的 JDBCTemplate 和 Hibernate 中的实现 - 关系型数据库原理 - MySQL 中的模式创建 - 使用 Hibernate 进行模式生成 - Liquibase 和 Flyway 的数据库迁移 - 使用 Spring Boot 和 JUnit 5 的数据库集成测试 - 使用 Hibernate 定义主键 - Hibernate 条件查询 - 命名的 JPA 查询 - Spring Data JPA 查询方法 - Spring Data JPA @Query 注解 - 实体关系 - 一对一、一对多、多对一、多对多 - 嵌入类型 - 自然键 - 复合键 - Spring Data JPA 查询方法 - 分页和排序 - 数据库事务管理 - 数据库获取操作 - 数据验证 - JPA 继承 - Hibernate 拦截器和监听器 - JPA 回调 - 遗留数据库映射 - 使用多个数据源 - Spring Data REST 今天就来注册学习 Hibernate 和 Spring Data JPA 吧!
Hibernate is the default JPA implementation used by Spring Data JPA.NOTE: Java 17 and Spring Boot 3 are required for this course.JPA stands for Java Persistence API. This is a common Java API used to work with Relational Databases. Spring Data JPA is an abstraction built on top of the JPA API specification. Being an abstraction, Spring Data JPA makes working with database entities very efficient. Spring Data JPA eliminates a lot of the boilerplate / cerimonial code, and allows developers to focus on developing business logic. The downside of the efficient abstraction is that accessing the database can become a mystery. Developers who just understand how to use Spring Data JPA do not understand the complexities of JDBC and Hibernate. You will start this course with a basic demonstration of Spring Data JPA. In this section you will learn how to work with a H2 in-memory database. You'll see how easy it is to work with Spring Data JPA. You will also begin to understand how the Hibernate interaction is being abstracted away. Since JPA is the Java API for working with Relational Databases, the course takes a closer look at Relational Databases and MySQL specifically. MySQL is the most popular open source relational database in the world. You will learn how to configure Spring Boot to test with a H2 in-memory database and to run integration tests against a MySQL database. This is a common real-world example leveraging the power of Spring and Hibernate to give you a very flexible environment. Once we've established a persistent database, we can explore using database migration tools. Liquibase and Flyway are two very popular database migration tools. Spring Boot supports both options. And you will learn about both options and database security best practices.By establishing a MySQL database, Spring Boot Integration Tests, and automated database migrations we can use Test Driven Development to explore the features of JDBC and Hibernate.In the course you will learn:What is the DAO pattern, and how to implement it using JDBC, Spring's JDBCTemplate, and HibernateRelational Database PrinciplesSchema Creation in MySQLSchema Generation using Hibernate Database Migrations using LiquibaseDatabase Migrations using FlywayDatabase Integration Testing using Spring Boot and JUnit 5Defining Primary Key's with Hibernate Hibernate Criteria QueriesNamed JPA QueriesSpring Data JPA query methodsSpring Data JPA @Query Annotation Entity Relationships - One to One, One to Many, Many to One, Many to ManyEmbedded TypesNatural KeysComposite KeysSpring Data JPA Query MethodsPaging and SortingDatabase Transaction Management Database Fetch Operations Data Validation JPA InheritanceHibernate Interceptors and ListenersJPA CallbacksLegacy Database MappingUsing Multiple Data SourcesSpring Data RESTLearn Hibernate and Spring Data JPA - Enroll today!