目录

    • 【简介】
    • 【GitHub 地址】
    • 【源码下载】


【简介】

实际开发中我们经常使用MyBatis作为orm框架,面试时也经常会问有没有debug过MyBatis源码,本文主要介绍怎样下载导入和运行源码


【GitHub 地址】

https://github/qidasheng2012/mybatis-3.4.6

项目包括:MyBatis3.4.6源码(org包下) + 修改pom.xml (mysql + lombok + 修改为jdk1.8 ) + MyBatis测试demo(图中红框部分)

  1. clone项目
  2. 根据db.properties创建数据库
  3. 执行提供的SQL脚本
  4. 启动MyBatisTest类,打断点debug测试

下文介绍源码的下载


【源码下载】

MyBatis3.4.6源码官网地址

通过查看mybatis的pom.xml文件,发现是一个聚合项目,依赖mybatis-parent

  <parent>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-parent</artifactId>
    <version>29</version>
    <relativePath />
  </parent>

【下载mybatis-parent】

https://github/mybatis/parent/releases/tag/mybatis-parent-29


本文参考:https://blog.csdn/csdnjquery163com/article/details/83009104

更多推荐

IDEA导入MyBatis源码并运行