MyBatis-Flex: An elegant MyBatis enhancement framework
feature
1. Very lightweight
The entire MyBatis-Flex framework only relies on MyBatis and has no other third-party dependencies.
2. Only enhance
MyBatis-Flex supports CRUD, paging queries, multi-table queries, and batch operations without losing any of MyBatis' original functions.
3. High performance
MyBatis-Flex adopts a unique technical architecture. Compared with many similar frameworks, MyBatis-Flex's performance in terms of addition, deletion, modification, and query is 5 to 10 times or more higher than that of many similar frameworks.
4. More flexible
MyBatis-Flex supports multiple primary keys, multi-table queries, logical deletions, optimistic locking, data desensitization, data encryption, multiple data sources, sub-databases and sub-tables, field permissions, field encryption, multi-tenants, transaction management, SQL audit... Etc., etc. All this, free and flexible.
MyBatis-Flex v1.7.5~v.17.6 update details are as follows:
- New: Db.selectFirstAndSecondColumnsAsMap method: the first column of the query result is used as key, and the second column is used as value, thanks @tangxin
- New: Dialect added to add permission processing unified entrance prepareAuth, thanks @bf109f
- Optimization: Fixed the problem of not displaying empty array exception information when an array exception occurs. Thanks to @王伟
- Optimization: Modify the typos related to the QueryCondition class, thanks @王伟
- Optimization: Upgrade MyBatis related dependencies to the latest version, thanks @lcxw
- Fixed: DB2 v10.5 does not support the offset keyword for paging, thanks @farukonfly
- Fixed: DB2 v10.5 does not support Nulls First or Nulls Last syntax, thanks to @farukonfly
- Fix: FieldWrapper reported an error when partially updating a generic Entity, thanks @tangxin
- Fix: Db.updateEntitiesBatch reported an error in some scenarios when updating some fields, thanks @tangxin
- Fix: Update error when field type is YearMonth, Year, etc. #I8CGVM: [Bug]: YearMonth, Year, etc. are not supported
- Fix: The main method directly calls the updateChain method to build a sql and the error occurs when calling toSQL #I8NF9T: [Bug]: The main method directly calls the updateChain method to build a sql statement and cannot call the toSQL method to display the SQL statement.
- Fix: Primary key ID: When an empty string is passed in, the calling method will not automatically generate the primary key ID.
insert
@Id
- Fixed: Null pointer exception issue
FlexTransactionManager
in some cases - Fix:
@ColumnMask
, the problem of ineffectivenesstypeHandler
due to conflict when used together@ColumnMask
- Testing: Optimize unit tests, remove println, add more assertions, thanks @mofangogogo
- Documentation: Added solution for SpringBoot 3.2 version startup failure, thanks @王伟
- Documentation: Optimize relevant content of English documentation, thanks @mofangogogo
For code contributors, please refer to: https://mybatis-flex.com/zh/intro/what-is-mybatisflex.html#%E8%B4%A1%E7%8C%AE%E8%80%85
To learn more about the MyBatis-Flex framework, please refer to the link:
- 1. Quick start: https://mybatis-flex.com/zh/intro/getting-started.html
- 2. Multi-table related query: https://mybatis-flex.com/zh/base/query.html
- 3. One-to-many, many-to-one: https://mybatis-flex.com/zh/base/relations-query.html
- 4. Flexible QueryWrapper: https://mybatis-flex.com/zh/base/querywrapper.html
- 5. Logical deletion: https://mybatis-flex.com/zh/core/logic-delete.html
- 6. Optimistic locking: https://mybatis-flex.com/zh/core/version.html
- 7. Data filling: https://mybatis-flex.com/zh/core/fill.html
- 6. Data desensitization: https://mybatis-flex.com/zh/core/mask.html
- 7. SQL audit: https://mybatis-flex.com/zh/core/audit.html
- 8. Multiple data sources: https://mybatis-flex.com/zh/core/multi-datasource.htm
- 9. Data source encryption: https://mybatis-flex.com/zh/core/datasource-encryption.html
- 10. Dynamic table name: https://mybatis-flex.com/zh/core/dynamic-table.html
- 11. Transaction management: https://mybatis-flex.com/zh/core/tx.html
- 12. Data permission: https://mybatis-flex.com/zh/core/data-permission.html
- 13. Field permissions: https://mybatis-flex.com/zh/core/columns-permission.html
- 14. Field encryption: https://mybatis-flex.com/zh/core/columns-encrypt.html
- 15. Dictionary write-back: https://mybatis-flex.com/zh/core/columns-dict.html
- 16. Enumeration properties: https://mybatis-flex.com/zh/core/enum-property.html
- 17. Multi-tenancy: https://mybatis-flex.com/zh/core/multi-tenancy.html
- 18. Code generator: https://mybatis-flex.com/zh/others/codegen.html
- 19. QQ communication group: https://mybatis-flex.com/zh/intro/qq-group.html
- 20. Better features are on the way: https://mybatis-flex.com
bilibili video tutorial (free):
Course: "MyBatis-Flex Video Tutorial"
Course Introduction: This course is recorded and lectured by Teacher Wang Shuai . Teacher Wang Shuai is also the committer who has contributed the most to the MyBatis-Flex code besides the author. He has a very in-depth understanding of both MyBatis and MyBatis-Flex.
Course address: