MyBatis-Flex: An elegant MyBatis enhancement framework
feature
1. Very lightweight
The entire framework of MyBatis-Flex only depends on MyBatis, and no other third-party dependencies.
2. Only enhance
MyBatis-Flex supports CRUD, paging query, multi-table query, and batch operations without losing any of the original functions of MyBatis.
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-10 times or more.
4. More agile
MyBatis-Flex supports multiple primary keys, multi-table queries, logical deletion, optimistic locking, data desensitization, data encryption, multiple data sources, sub-database sub-tables, field permissions, field encryption, multi-tenancy, transaction management, SQL auditing... Etc., etc. All this, free and flexible.
MyBatis-Flex v1.6.0 update details are as follows:
- New: Added support for databases Hive SQL and Doris
- New: ActiveRecord adds saveOpt method, user saves data and returns content
- New: Data query adds support for automatic mapping of ignore fields
- New: Add RelationManager.addQueryRelations() method to query only part of related fields
- Optimization: Refactoring removes the methods or classes that have been marked for deletion! ! ! breaking update
- Optimization: Add more parameter setting methods to SnowFlakeIDKeyGenerator
- Optimization: Refactor FlexSpringTransaction to have higher performance
- Optimization: optimize Mappers and add necessary annotations, thanks @王朱
- Optimization: Refactor the code generator, add support for chained calls and necessary code comments, thanks to @王朱
- Optimization: Refactoring unifies the judgment of not being null into QueryColumnBehavior, which is convenient for users to customize logic, thanks @王朱
- Optimization: Modify some annotation errors under FlexSqlSessionFactoryBean, thanks @cainiao3853
- Fix: NPE problem occurs when using as in some scenarios #I7T00C:[Bug]: NPE error is reported when multi-table joint query
- Fix: In the scenario of Db + Row, the result is incorrect when customizing RowKey
- Fix: QueryMethods.dateFormat use wrong problem #I7TEUM: [Bug]: dateFormat exception
- Fix: QueryMethods.substring use wrong problem #I7TEUM: [Bug]: dateFormat exception
- Fix: When returning to map, configuring map-underscore-to-camel-case does not work
- Fix: The configuration of the data source decryptor through the Bean annotation and the configuration of the custom configuration are inconsistent #I7UHUN: [Bug]: The configuration of the decryptor is not uniform
- Fix: The problem of using Hutool's BeanUtil.copyProperties to copy Page fails #I7VBUE:[Bug]: When using BeanUtil.copyProperties, because the data type is defined as long but the data type of the set method is received as number, it cannot be copied correctly
- Fix: UpdateEntity does not filter @Column(ignore = true) fields #I7RE0J:[Bug]: UpdateEntity does not filter @Column(ignore = true) fields
- Fix: FlexSpringTransaction error in some scenarios, thanks to @chenjh3
- Fix: The batch operation under Oracle may return incorrect results in some cases
- Fix: The code generator has NPE problems in some cases, thanks to @王朱
- Fix: The ignore attribute caused by the v1.5.9 version is also added to the defaultQueryColumns default query column, thanks to @王朱
- Documentation: Add relevant documentation for use by RelationManager.addQueryRelations()
- Documentation: Add mybatis-flex-dependencies usage instructions, thanks to @王朱
- Documentation: Modify some typos under FAQ
- Docs: FAQ Added how to get save and get related docs of primary key
- Documentation: When adding multiple tombstones, update the relevant documents of the deleter and delete time at the same time
- Docs: Potentially useless error note when adding bulk operations
- Documentation: Optimize the relevant documents of the code generator, thanks to @王朱
- Documentation: Add saveOpt related documents to ActiveRecord, thanks to @王朱
- Documentation: The problem of modifying the sample code of the dynamic table name is wrong, thanks to @王朱
- Documentation: Fix the problem of gradle documentation error, thanks to @鹤雨笑猪黑
- Documentation: Fix some wrong descriptions of Db + Row, thanks @yang_zzu
The current version has been released, thanks to the PR of the following 5 students, they are:
@王帅, @cainiao3853 , @yang_zzu , @鹤雅笑猪黑, @chenjh3
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 association 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 lock: https://mybatis-flex.com/zh/core/version.html
- 7. Data filling: https://mybatis-flex.com/zh/core/fill.html
- 6. Data masking: 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. Write back the dictionary: 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 exchange group: https://mybatis-flex.com/zh/intro/qq-group.html
- 20. More useful functions are on the way: https://mybatis-flex.com
bilibili video tutorial (free):
- MyBatis-Flex Video Tutorial - 01 Course Introduction
- MyBatis-Flex Video Tutorial - 02 Introduction to MyBatis-Flex
- MyBatis-Flex Video Tutorial - 03 Why use MyBatis-Flex
- MyBatis-Flex Video Tutorial - 04 Quick Start Based on SpringBoot
- MyBatis-Flex Video Tutorial - 05 Introduction to Automatically Generated Classes
- MyBatis-Flex Video Tutorial - 06 MyBatis-Flex Configuration Options
- MyBatis-Flex Video Tutorial - 07 Getting to Know the BaseMapper Interface
- MyBatis-Flex Video Tutorial - 08 Insert Data
- MyBatis-Flex Video Tutorial - 09 Delete Data
- MyBatis-Flex Video Tutorial - 10 Update Data
- MyBatis-Flex Video Tutorial - 11 Complex Updates
- MyBatis-Flex Video Tutorial - 12 Basic Queries
- MyBatis-Flex Video Tutorial - 13 Mapped Query
- MyBatis-Flex Video Tutorial - 14 Introduction to QueryWrapper
- MyBatis-Flex Video Tutorial - 15 Operation of QueryWrapper
- MyBatis-Flex Video Tutorial - 16 Simple Use of @Table Annotation
- MyBatis-Flex Video Tutorial - 17 Use of onInsert and onUpdate
- MyBatis-Flex Video Tutorial - 18 onSet implements field permissions
- MyBatis-Flex Video Tutorial - 19 onSet implements field encryption
- MyBatis-Flex Video Tutorial - 20 onSet implements dictionary write-back
- MyBatis-Flex Video Tutorial - 21 Global Listener Configuration
- MyBatis-Flex Video Tutorial - 22 Simple Use of @Id
- MyBatis-Flex Video Tutorial - 23 Custom Primary Key Generators
- MyBatis-Flex Video Tutorial - Simple Use of 24 @Column Annotations
- MyBatis-Flex Video Tutorial - 25 Simple use of isLogicDelete logical deletion
- MyBatis-Flex Video Tutorial - 26 Custom Tombstone Processors
- MyBatis-Flex Video Tutorial - Simple Use of 27 Version Optimistic Locks
- MyBatis-Flex Video Tutorial - Simple use of 28 tenantId multi-tenants
- MyBatis-Flex Video Tutorial - Simple Use of 29 typeHandler
- MyBatis-Flex Video Tutorial - Simple Use of 30 Data Desensitization
- MyBatis-Flex Video Tutorial - 31 Use of Enumerated Properties
- MyBatis-Flex Video Tutorial - 32 Join Query
- MyBatis-Flex Video Tutorial - 33 Field Query
- MyBatis-Flex Video Tutorial - 34 Relation Query
- MyBatis-Flex Video Tutorial - 35 Association query comparison
- MyBatis-Flex Video Tutorial - 36 Paging Query
- MyBatis-Flex Video Tutorial - 37 paging query count query optimization
- MyBatis-Flex Video Tutorial - 38 High-performance paging based on XML files
- MyBatis-Flex Video Tutorial - 39 Db + Row
- MyBatis-Flex Video Tutorial - 40 Batch Operations
- MyBatis-Flex Video Tutorial - 41 IService Interface Introduction
- MyBatis-Flex Video Tutorial - 42 Use of Data Permissions
- MyBatis-Flex Video Tutorial - 43 Chained Operations
- MyBatis-Flex Video Tutorial - 44 Configuration of Multiple Data Sources
- MyBatis-Flex Video Tutorial - 45 Multiple Data Source Switching
- MyBatis-Flex Video Tutorial - 46 Dynamically Add Data Sources
- MyBatis-Flex Video Tutorial - 47 Data Source Encryption
- MyBatis-Flex Video Tutorial - 48 Transaction Management
- MyBatis-Flex Video Tutorial - 49 Cursor Query
- MyBatis-Flex Video Tutorial - 50 Data Cache
- MyBatis-Flex Video Tutorial - Simple Use of 51 Data Cache
- MyBatis-Flex Video Tutorial - 52 Dynamic Table Names
- MyBatis-Flex Video Tutorial - 53 Active Record Mode