IDEA导入MyBatis源码并运行

【简介】

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


【GitHub 地址】

https://github.com/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.com/mybatis/parent/releases/tag/mybatis-parent-29

在这里插入图片描述
本文参考:https://blog.csdn.net/csdnjquery163com/article/details/83009104

发布了138 篇原创文章 · 获赞 69 · 访问量 13万+

猜你喜欢

转载自blog.csdn.net/qidasheng2012/article/details/103568167