一、Mybatis設計架構
1、架構圖
2、流程圖
二、源碼解析系列
1、源碼解析
https://www.bbsmax.com/A/rV57bKkRJP/
2、Plug的工作原理
https://www.cnblogs.com/qdhxhz/p/11390778.html
3、Dao沒有實現類的思想(JDK動態代理)
https://www.cnblogs.com/hopeofthevillage/p/11384848.html
SqlSessionFactory sqlMapper = new SqlSessionFactoryBuilder().build(reader);
SqlSession session= sqlMapper.openSession();
TestTableMapper t= session.getMapper(TestTableMapper.class);
TestTable tt=(TestTable)t.selectByPrimaryKey("wwww");
三、Mybatis的攔截器,攔截的接口
Mybatis的四大接口是哪些: Executor,StatementHandler, ResultSetHandler, ParameterHandler
http://www.mybatis.cn/archives/81.html
四、Mybatis中涉及的涉及模式
http://www.mybatis.cn/archives/631.html
五、Spring事務的管理
六、Mybatis batch insert 返回主鍵設置
設置: useGeneratedKeys="true" keyProperty="suggestionId
@Param("list") foreach中 collection="list" 必須命名爲list