MyBatis-Flex: 一个优雅的 MyBatis 增强框架
特征
1、很轻量
MyBatis-Flex 整个框架只依赖 MyBatis,再无其他任何第三方依赖。
2、只增强
MyBatis-Flex 支持 CRUD、分页查询、多表查询、批量操作,但不丢失 MyBatis 原有的任何功能。
3、高性能
MyBatis-Flex 采用独特的技术架构、相比许多同类框架,MyBatis-Flex 的在增删改查等方面的性能均超越其 5~10 倍或以上。
4、更灵动
MyBatis-Flex 支持多主键、多表查询、逻辑删除、乐观锁、数据脱敏、数据加密、多数据源、分库分表、字段权限、 字段加密、多租户、事务管理、SQL 审计... 等等等等。 这一切,免费且灵动。
MyBatis-Flex v1.8.7 更新细节如下:
- 新增:feat: 添加 @TableRef 注解标记 VO 类和 Entity 绑定,方便关联查询直接转换为 VO,感谢 @王帅
- 新增:Db + Row 支持 QueryWrapper 的原生 SQL 构建,感谢 @王帅
- 优化:XML 分页 #{qwSql} 参数补充逻辑删除等参数,感谢 @王帅
- 优化:insertBatch(entities, size) 和 insertBatch(entities) 对空 list 的处理不一致问题 #I9EGWA:[Bug]: insertBatch(entities, size)和insertBatch(entities)对空list的处理不一致
- 修复: 修正使用 MyBatis 原生工具方法 PropertyNamer#methodToProperty 可能造成无法正确获取属性的问题,感谢 @王帅
- 修复:修复当 APT 配置多个 ignoreSuffix 时,可能导致生成的类名不正确的问题 #I9ED9N:[Bug]: APT过滤 Entity 后缀Bug
- 修复:QueryWrapper 通过 Map 构造查询条件,并传入 SqlOperators 时,Like 不能正确拼接 % 的问题 #I9F8HO:[Bug]: Map构造查询条件时Like拼接的sql语句不能正常拼接%
- 修复:代码生成器的 EnjoyTemplate 在并发下可能出现异常的问题
- 测试:添加 Db + Row 原生 SQL 子查询插入与更新测试,感谢 @王帅
代码贡献者,请参考:https://mybatis-flex.com/zh/intro/what-is-mybatisflex.html#%E8%B4%A1%E7%8C%AE%E8%80%85
进一步了解 MyBatis-Flex 框架,请参考一下链接:
- 1、快速开始:https://mybatis-flex.com/zh/intro/getting-started.html
- 2、多表关联查询:https://mybatis-flex.com/zh/base/query.html
- 3、一对多、多对一:https://mybatis-flex.com/zh/base/relations-query.html
- 4、灵活的 QueryWrapper:https://mybatis-flex.com/zh/base/querywrapper.html
- 5、逻辑删除:https://mybatis-flex.com/zh/core/logic-delete.html
- 6、乐观锁:https://mybatis-flex.com/zh/core/version.html
- 7、数据填充:https://mybatis-flex.com/zh/core/fill.html
- 6、数据脱敏:https://mybatis-flex.com/zh/core/mask.html
- 7、SQL 审计:https://mybatis-flex.com/zh/core/audit.html
- 8、多数据源:https://mybatis-flex.com/zh/core/multi-datasource.htm
- 9、数据源加密:https://mybatis-flex.com/zh/core/datasource-encryption.html
- 10、动态表名:https://mybatis-flex.com/zh/core/dynamic-table.html
- 11、事务管理:https://mybatis-flex.com/zh/core/tx.html
- 12、数据权限:https://mybatis-flex.com/zh/core/data-permission.html
- 13、字段权限:https://mybatis-flex.com/zh/core/columns-permission.html
- 14、字段加密:https://mybatis-flex.com/zh/core/columns-encrypt.html
- 15、字典回写:https://mybatis-flex.com/zh/core/columns-dict.html
- 16、枚举属性:https://mybatis-flex.com/zh/core/enum-property.html
- 17、多租户:https://mybatis-flex.com/zh/core/multi-tenancy.html
- 18、代码生成器:https://mybatis-flex.com/zh/others/codegen.html
- 19、QQ 交流群:https://mybatis-flex.com/zh/intro/qq-group.html
- 20、更好用的功能正在路上:https://mybatis-flex.com
bilibili 视频教程(免费):
课程 :《MyBatis-Flex 视频教程》
课程简介:该课程由 王帅 老师录制主讲, 王帅 老师也是除了作者以外,对 MyBatis-Flex 代码贡献最大的 committer。 其无论对 MyBatis 还是 MyBatis-Flex,都有非常深入的理解。
课程地址: