abel533/Mapper
Mybatis Common Mapper - Easy to use
11 Releases
Latest: 4mo ago
6.0.0Latest
📦 6.0.0 版本更新 (2026-02-12)
- 适配 Spring Boot 4.x (JDK 17+, Jakarta JPA)
- 依赖更新:Spring Boot 4.0.2, Spring Framework 7.0.3, MyBatis 3.5.19, JPA 3.2.0
- mybatis-spring 更新到 4.0.0
- safeDelete 时校验更严格,如果 Example 有条件为 null 被忽略导致全表操作也会被禁止。
- logicDeleteByKey 的处理还不完善,默认值和原有逻辑一致,暂时不要使用。
- aggregation 操作中的字段会处理别名
- 新增:根据实体中的属性进行查询指定属性
✨ New Contributors
- @Wang-Benjamin made their first contribution in https://github.com/abel533/Mapper/pull/940
- @gcanlin made their first contribution in https://github.com/abel533/Mapper/pull/936
- @weifly made their first contribution in https://github.com/abel533/Mapper/pull/948
- @ajie-dev made their first contribution in https://github.com/abel533/Mapper/pull/793
- Full Changelog: https://github.com/abel533/Mapper/compare/5.0.1...6.0.0
5.0.2
📦 5.0.2 版本更新 (2026-02-12)
- safeDelete 时校验更严格,如果 Example 有条件为 null 被忽略导致全表操作也会被禁止。
- logicDeleteByKey 的处理还不完善,默认值和原有逻辑一致,暂时不要使用。
- aggregation 操作中的字段会处理别名
- 新增:根据实体中的属性进行查询指定属性
- Full Changelog: https://github.com/abel533/Mapper/compare/5.0.1...5.0.2
4.3.2
📦 4.3.2 版本更新 (2026-02-12)
- safeDelete 时校验更严格,如果 Example 有条件为 null 被忽略导致全表操作也会被禁止。
- logicDeleteByKey 的处理还不完善,默认值和原有逻辑一致,暂时不要使用。
- aggregation 操作中的字段会处理别名
- 新增:根据实体中的属性进行查询指定属性
📦 4.3.1 版本更新 (2026-02-11)
- 将所有 Spring 相关依赖升级到 Spring Boot 2.x 的最新稳定版本,保持与 Spring Boot 2.7.x 体系的兼容性。
- 主要依赖版本升级:
- 1. Spring Boot: `2.6.4` → `2.7.18`
- Spring Boot 2.x 系列的最终版本(2023年11月发布)
- 包含重要的安全更新和 bug 修复
- 完全兼容 Java 8-17
- 2. Spring Framework: `4.3.30.RELEASE` → `5.3.31`
- 与 Spring Boot 2.7.x 配套的最新版本
- + 24 more
5.0.1
📋 Changes
- [增加参数`enableBaseResultMapFlag` 是否自动处理 Mapper 接口中其他手写指定 resultType 的返回结果类型为 resultMap。](https://github.com/abel533/Mapper/commit/8e3e5a83bbc54a2dd83100f02dca0ef18a8a2bdf),默认 `false` 不启用。
5.0.0 发布5.0.0
📋 Changes
- 基于 jdk17 和 spring boot 3.3 开发
- JPA 依赖改为 jakarta.persistence-api
- mybatis-spring 重新适配,兼容原有配置
- mybatis-spring-boot-starter 重新适配,兼容原有配置和逻辑
📦 特别说明
- mybatis.basePackages 是 tk.mapper 中特有的配置(4.x就有的),当通过这个配置指定 Mapper 所在包后,不会再指定扫描 @Mapper 注解的接口。会扫描指定包下面所有的接口(会排除 `@RegisterMapper` 注解标记的通用接口)。
4.3.0
📋 What's Changed
- 解决Mapper父接口的泛型信息在使用泛型的场景下报ClassCastException的问题,fixed #886 by @samyge in https://github.com/abel533/Mapper/pull/887
- 添加了对solon的插件支持 by @trifolium-x in https://github.com/abel533/Mapper/pull/914
- 一个Mapper中支持多个不同类型的provider by @YuanHao97 in https://github.com/abel533/Mapper/pull/908
- WeekendSqlsUtils新增select方法;generator新增配置,强制不生成注解 by @erengong in https://github.com/abel533/Mapper/pull/901
- 修复了`Class.getDeclaredFields()`返回的元素的不确定顺序引起的问题 by @SaaiVenkat in https://github.com/abel533/Mapper/pull/896
- 为@LogicDelete注解提供两个字段用于处理希望null作为逻辑删除的标记的能力。表示以null作为删除/未删除记录的标识 by @getError in https://github.com/abel533/Mapper/pull/894
✨ New Contributors
- @samyge made their first contribution in https://github.com/abel533/Mapper/pull/887
- @trifolium-x made their first contribution in https://github.com/abel533/Mapper/pull/914
- @YuanHao97 made their first contribution in https://github.com/abel533/Mapper/pull/908
- @erengong made their first contribution in https://github.com/abel533/Mapper/pull/901
- @SaaiVenkat made their first contribution in https://github.com/abel533/Mapper/pull/896
- @getError made their first contribution in https://github.com/abel533/Mapper/pull/894
- Full Changelog: https://github.com/abel533/Mapper/compare/4.2.3...4.3.0
4.2.3 发布4.2.3
📦 4.2.3 - 2023-06-03
- UpsertMapper 添加@RegisterMapper注解,fixed #878
- 解决ColumnType注解的限制问题,fixed #883
- fix:替代Optional方法和lambda表达式,兼容jdk1.6使用环境 by kesyou1991
- feat:新增mapper bean懒加载功能 by kesyou1991
4.2.2
📦 4.2.2 - 2022-10-16
- 特别注意: 升级 mybatis generator 到 1.4.1,和 1.3.x 完全不兼容,如果使用 mbg,需要自己依赖的插件也用1.4.x版本
- 4.2.2 版本合并了最近几年的PR,关闭了几百个issues,github还剩余216,gitee还有18。剩余部分pr依赖jdk8。
- 4.2.x 版本在 2022 年末停止更新,后续会主要维护 4.3.x 版本,这个新版本会将 jdk 升级到 8,不在支持 jdk 6,7。
- 升级版本:
- 完善pom配置,不在使用旧的mybatis-parent,所有配置都包含在当前项目中
- 升级 mybatis generator 到 1.4.1,和 1.3.x 完全不兼容
- 升级 mybatis 为 3.5.11
- align mybatis-spring to 1.3.2 in all modules huangkaifeng
- + 31 more
4.2.1 - 2022-2-274.2.1
📦 4.2.1 - 2022-2-27
- 4.2.0 版本中缺少了 gitee 仓库中的两个合并请求,针对这部分代码,再次发布 4.2.1 版本。
- `orderByDesc`只有最后一个字段是倒序,改为所有参与`orderby`的字段都倒序 Mr 轩少/V1.1.5-orderByDesc-fix
- 增加Lombok 的`@SuperBuilder、@NoArgsConstructor、@AllArgsConstructor` 注解 tingwen 2020/12/26 18:29 8c816794
📦 4.2.0 - 2022-2-26
- 本次更新最大改动就是统一了所有模块的版本,所有版本都升级为 4.2.0,在之前本项目一共有3个版本号,本次升级前后的版本如下:
- mapper, mapper-all, mapper-all-dependencies 从 4.1.5 升级为 4.2.0
- mapper-core, mapper-base, mapper-extra, mapper-generator, mapper-spring, mapper-weekend 从 1.1.5 升级为 4.2.0
- mapper-spring-boot-starter 相关模块从 2.1.5 升级为 4.2.0
- 本次更新是 2019年1月28日发布 4.1.5 之后的首次发布,此次更新的内容基本上都来自所有热心开发人员的PR,大部分PR都是功能增强或新功能。
- `WeekendSqls` or部分方法参数 String->Object taiyi* 2021/11/29 19:39 1aa5eff6
- 改进对null的查询 改进对空集合的查询 改进对like的查询 Cheng.Wei* 2020/3/19 0:24 1523d57f
- 改进查询对null值的处理策略 Cheng.Wei* 2020/3/19 0:07 afb6ffc8
- + 16 more
📦 还会有 MyBatis 通用 Mapper5 吗?
- 通用 Mapper 每次大的版本,基本上都是底层上的大变化,在使用通用 Mapper 的过程中,有很多人遇到过配置的问题,因为底层实现的方式,所以无法避免配置,而且随着功能的增加,配置也增加了不少。
- 为了从根本上简化通用方法的实现,从2018年就开始思考如何让实现和MyBatis的兼容性更好,让实现变的更简单,为了从 MyBatis 根本解决问题,给官方提过好几个 PR,在 2019年3月份给 MyBatis 提交的
- [pr#1391](https://github.com/mybatis/mybatis-3/pull/1391) 合并后(对应 3.5.1 版本,最低要求版本),终于能以更简单的方式来实现通用 Mapper 了。
- 由于此次变动太大,因此不打算对 通用Mapper4 进行任何改动,从头实现了一个新的项目,名字仍然没有新意的使用了 `mybatis-mapper`,这个项目也发布很久了,由于工作太忙,没精力像以前那样频繁更新, 所以一直没推广新版
- mybatis-mapper,如果你动手能力强,喜欢看源码,你也可以试试这个项目:
- [GitHub](https://github.com/mybatis-mapper/mapper)
- [Gitee](https://gitee.com/mybatis-mapper/mapper)
- [文档: https://mapper.mybatis.io](https://mapper.mybatis.io/)
- + 4 more
通用 Mapper 3.4.2 发布3.4.2
📋 Changes
- 简化Example的xml逻辑,解决由于and,or位置错误导致Example使用空条件时的错误,完善测试
- 对应 mapper-starter 版本为 1.1.3
通用 Mapper 3.4.1 发布3.4.1
📦 3.4.1 - 2017-07-17
- `Example` 增加复杂的 `and` 和 `or` 功能。
- `Example` 增加排除查询字段的方法 `excludeProperties`(`selectProperties`优先级更高) [#261](http://git.oschina.net/free/Mapper/issues/261).
- `SqlHelper` 中复杂的 `if` 改为 `choose` 方式。
- 解决通过`@Column`配置关键字的分隔符时,无法得到该列值的bug。
