【深入学习Mybatis】Chapter1源码调试环境搭建

Mybatis简介

Mybatis 是一个一流的持久化框架,支持自定义SQL,存储过程和高级映射。
Mybatis几乎消除了所有的JDBC代码以及参数的手动设置和结果检索。Mybatis可以使用简单的XML或注释进行配置,并将原函数,映射接口和Java Pojo 映射到数据库记录。

MyBatis is a first class persistence framework with support for custom SQL, stored procedures and advanced mappings. MyBatis eliminates almost all of the JDBC code and manual setting of parameters and retrieval of results. MyBatis can use simple XML or Annotations for configuration and map primitives, Map interfaces and Java POJOs (Plain Old Java Objects) to database records.

环境信息

  • macOS Catalina
  • Git
  • JDK8
  • Maven3
  • Intellij

克隆源码到本地

git clone https://github.com/mybatis/mybatis-3.git

将源码导出本地

File > New > Project from Existing sources

选择源码目录将源码导入Intellij ,等待IDEA构建项目结构,时间可能会长一点儿

导入结构如图
mybatis 源码包结构图

运行测试用例

org.apache.ibatis.autoconstructor.AutoConstructorTest.fullyPopulatedSubject()

控制台输出如下信息说明环境搭建成功


Process finished with exit code 0

源码包结构说明

.
└── org
    └── apache
        └── ibatis
            ├── annotations \\ 注解模块 包含所有在mapper接口用到的注解
            ├── binding \\Bings mapper interfaces with mapped statements
            ├── builder \\ Base package for the Configuration building code
            ├── cache \\ 缓存模块
            ├── cursor \\ 游标模块
            ├── datasource \\ 数据源模块
            ├── exceptions \\ 异常模块
            ├── executor \\ 执行模块
            ├── io \\ 读取资源的工具
            ├── jdbc \\ JDBC工具类
            ├── lang \\ 
            ├── logging \\ 日志模块
            ├── mapping \\ 映射模块
            ├── parsing \\ 解析工具
            ├── plugin \\ 插件模块
            ├── reflection \\ 反射模块
            ├── scripting \\ SQL 解析
            ├── session \\ SQL会话
            ├── transaction \\ 事务模块
            └── type \\ 类型处理器

参考资料


  • https://github.com/mybatis/mybatis-3
  • https://mybatis.org/mybatis-3/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值