MyBatis-Plus 3.x Release Highlights: New Features, Fixes, and Upgrade Guide
MyBatis-Plus, an enhanced toolkit for MyBatis, simplifies CRUD operations and injects dynamic SQL, and this release introduces numerous bug fixes, new annotations, code‑generator enhancements, and upgrades to MyBatis, Spring Boot, and Kotlin, with important migration notes for developers.
Mybatis-Plus is an enhanced toolkit for MyBatis that simplifies CRUD operations. It injects single‑table SQL during XML configuration loading, providing dynamic SQL scripts with better performance, allowing developers to focus on business logic.
Demo example: https://gitee.com/baomidou/mybatis-plus-samples
Official documentation: https://baomidou.com/
Important!! Note the upgrade items below:
fix: resolve issue where fields annotated with TableField without specifying value caused global columnFormat to be ineffective
fix: resolve Kotlin code generation error in enjoy template
fix: resolve string code generation error in enjoy template
fix: resolve double‑quote escaping issue in springdoc generated annotations
fix: resolve missing primary‑key error when updating data‑change plugin
fix: resolve out‑of‑bounds error in multi‑table parsing processJoins
feat: add properties attribute to TableName annotation
feat: support @InterceptorIgnore annotation on default methods
feat: adapt to jsqlparser 5.1 (use mybatis-plus-jsqlparser-5.0 for 5.0 compatibility)
feat: provide InterceptorIgnoreHelper.execute method to handle plugin skip strategy and prevent thread‑resource leaks
feat: code generator global package configuration now supports custom template information retrieval
feat: code generator adds table index information retrieval
feat: code generator offers Mapper.Builder.generateMapperMethodHandler to generate index methods based on indexes
feat: code generator Entity supports custom class and field annotations
feat: code generator Entity supports Lombok mode for class annotations
feat: code generator Entity supports ToString method control via (Entity.Builder.toString(boolean))
feat: code generator Entity supports field JavaDoc comments via Entity.Builder.fieldUseJavaDoc(boolean)
feat: rewrite dynamic statement generation to remove newline characters from generated SQL
feat: security encryption processor now obtains keys from environment variables and system properties
feat: upgrade MyBatis to 3.5.19
feat: upgrade Spring Boot to 3.4.1
feat: upgrade Kotlin to 2.1.0
Low utility, syntax checks incomplete; plan to remove IllegalSQLInnerInterceptor plugin
Many functional defects; plan to remove DataChangeRecorderInnerInterceptor plugin
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.