【面试总结】尚硅谷 2021 百度云,Java 技术基础知识总结
Mybatis 入门
1、什么是 Mybatis?
MyBatis 本是 apache 的一个开源项目 iBatis, 2010 年这个项目由 apache software foundation 迁移到了 google code,并且改名为 MyBatis 。2013 年 11 月迁移到 Github。
MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息,将接口和 Java 的 POJOs(Plain Ordinary Java Object,普通的 Java 对象)映射成数据库中的记录。
2、为什么要用 Mybatis?

3、Mybatis 快速入门
导入开发包
准备测试工作
创建 mybatis 配置文件
编写工具类测试是否获取到连接
创建实体与映射关系文件
编写 DAO

4、Mybatis 工作流程

5、完成 CRUD 操作
增加学生
2 根据 ID 查询数据
查询所有数据
根据 id 删除
修改
小细节
Mybatis 分页

6、动态 SQL
动态查询
动态更新
动态删除
动态插入

Mybatis 配置信息
1、映射文件

2、配置文件

关联映射
Mybatis【多表连接】

缓存+Mapper 代理+逆向工程
1、Mybatis 缓存

2、mybatis 和 ehcache 缓存框架整合

3、Mapper 代理方式

4、Mybatis 解决 JDBC 编程的问题

5、Mybatis 逆向工程

Mybatis 整合 Spring
1、Mybatis 与 Spring 整合

Mybatis 常见面试题

Mybatis 源码——入门
为什么要使用 MyBatis
如何使用 MyBatis

Mybatis 源码——配置文件解析过程
配置文件解析过程分析

Mybatis 源码——映射文件解析过程
1、映射文件解析解析入口

2、解析映射文件

3、Mapper 接口绑定过程分析

4、处理未完成解析的节点

Mybatis 源码——SQL 执行流程
1、SQL 执行入口

2、查询语句的执行过程

3、更新语句的执行过程

4、SQL 执行过程总结

Mybatis 源码——内置数据源
1、内置数据源初始化过程

2、UnpooledDataSource

3、PooledDataSource

Mybatis 源码——缓存机制
1、缓存类介绍
2、CacheKey
3、一级缓存
4、二级缓存

Mybatis 源码——插件机制
插件机制原理
实现一个分页插件

写在最后
为了这次面试,也收集了很多的面试题!
以下是部分面试题截图

评论