code-learning/学习指南/09-Hibernate 学习指南.md

62 lines
4.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 精尽 Hibernate 学习指南
可能对于头发比较茂盛的胖友来说,可能是没学习过 Hibernate 。一旦提到 Hibernate 时,就深恶痛绝,鄙视其不够灵活,且性能过差。但是呢,实际是:
- 1、Hibernate 和 MyBatis 不会存在太大的性能差异。往往出现性能问题是,使用者错误的使用。
- 2、国外大多数使用 Hibernate 为主,国内大多数使用 MyBatis 为主。
感兴趣的胖友,可以看看如下三篇文章:
- [《国内程序员的十大疑问之一为什么老外不愿意用MyBatis](https://www.jianshu.com/p/654f387cd865)
- [《为什么感觉国内比较流行的 mybatis 在国外好像没人用的样子?》](https://www.v2ex.com/t/518087)
- [《MyBatis和Hibernate相比优势在哪里](https://www.zhihu.com/question/21104468)
当然了,既然 MyBatis 是国内比较重度使用,所以 Hibernate 可以作为选择性学习。亲,请不要挑战“国情”。
抛开以上的问题不说,可能很多胖友是搞不清楚 JPA、Spring Data JPA、Hibernate 三者的关系的。😈 可以来看看 [《JPA规范与ORM框架之间的关系是怎样的呢](https://www.cnblogs.com/xiaoheike/p/5150553.html) 。嘿嘿,艿艿有时候喜欢拿这个问题来“坑”候选人。不过哈,答对只会加分,答错也不会扣分,纯粹判断这个人是否在这块的知识体系是否清晰。
# 视频
- [《Hibernate 视频教程全集》](https://www.bilibili.com/video/av59574656/?pikaqiu) 一共 60P 15 小时。
> **推荐~记得 b 站【收藏 + 点赞 + 投币】素质三连噢**。
>
> 本视频分成 A/B/C 三部分。
>
> - 【必选】A 部分Hibernate 篇) P01-P25
>
> Hibernate配置文件编写Hibernate动态SQLHibernate缓存机制Hibernate-Spring整合Hibernate逆向工程Hibernate高级内容Hibernate源码解析Hibernate单/多插件运行机制Hibernate四大对象工作原理自定义TypeHandler、Hibernate存储过程&游标处理等)。 视频中会在重要的地方对比Hibernate操作MySQL以及Oracle之间的差异性。
>
> - 【可选】B 部分JPA 篇) P26-P49
>
> Hibernate-Plus是一款非常强大的Hibernate增强工具包,只做增强不做改变.在不用编写任何SQL语句的情况下即可以极其方便的实现单一、批量、分页等操作。本套教程基于Hibernate-Plus新2.3版本。
>
> - 【必选】C 部分Spring Data 篇) P50-P60
>
> 虽然是讲 Spring Data ,但是内容是以 Spring Data JPA 为主。当然实际上Spring Data 是一个体系,也有 Spring Data MongoDB 等等其他实现。
- 传智播客 [《Hibernate 从入门到精通》](https://www.bilibili.com/video/av46992190) 一共有 50P 12 小时。
- 千锋教育 [《快速入门Hibernate5.0》](https://www.bilibili.com/video/av45818582) 一共有 32P 7 小时。
上述的视频,是艿艿翻了下目前大家看的比较多的视频,利益无关哈。
# 书籍
[《Hibernate 书单整理》](http://www.iocoder.cn/Books/Hibernate-books-recommended)
相对来说没有什么特别合适的书。当年艿艿买的是孙卫琴的《精通Hibernate第2版但是奈何实在太厚并且工作中使用的是 MyBatis 。所以呢,就没有去看。
而入门的时候,自己看的是马士兵的 Hiberante 。
# 文章
- [《芋道 Spring Boot 数据库连接池入门》](http://www.iocoder.cn/Spring-Boot/datasource-pool/?vip) 对应 [lab-19](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-19)
- [《芋道 Spring Boot JPA 入门》](http://www.iocoder.cn/Spring-Boot/JPA/?vip) 对应 [lab-13-spring-data-jpa](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-13-spring-data-jpa)
- [《芋道 Spring Boot 多数据源(读写分离)入门》](http://www.iocoder.cn/Spring-Boot/dynamic-datasource/?vip) 对应 [lab-17](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-17)
- [《芋道 Spring Boot 分库分表入门》](http://www.iocoder.cn/Spring-Boot/sharding-datasource/?vip) 对应 [lab-18](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-18)
- [《芋道 Spring Boot 数据库版本管理入门》](http://www.iocoder.cn/Spring-Boot/database-version-control/?vip) 对应 [lab-20](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-20)
- [《芋道 Spring Boot 数据表结构文档》](http://www.iocoder.cn/Spring-Boot/DB-Doc-screw/?vip) 对应 [lab-70-db-doc](https://github.com/YunaiV/SpringBoot-Labs/tree/master/lab-70-db-doc)
- [《性能测试 —— MySQL 基准测试》](http://www.iocoder.cn/Performance-Testing/MySQL-benchmark/?github)
- [《一起来学 SpringBoot 2.x | 第六篇:整合 SpringDataJPA》](http://www.iocoder.cn/Spring-Boot/battcn/v2-orm-jpa/?svip&vip)
- [《Spring Data JPA 从入门到进阶系列教程》](http://www.iocoder.cn/Spring-Data-JPA/good-collection/?svip&vip)