Skip to content
CAI
Software that uses CAICheck a score

baomidou/mybatis-plus

65.6

Adequate · 25 September 2026

60.5k

lines of production code

Java

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

MyBatis-Plus is a database enhancement framework for Java and Kotlin that simplifies data access by providing a comprehensive set of CRUD operations, dynamic SQL building, and batch processing capabilities. It integrates with Spring Boot to offer auto-configuration, multi-tenant and data-permission interceptors, and a code generator for rapid application development. The system supports a wide range of databases and includes utilities for pagination, caching, and type handling.

How it got here

2016–2018 — Core architecture refactoring and modularization

50 changes.

This period was dominated by a comprehensive refactoring of the MyBatis-Plus core and extension modules, introducing new interfaces, wrapper classes, and a centralized configuration system. The team also significantly expanded the code generator's database support and template engine architecture, while migrating the build system to Gradle and adding extensive H2-based test coverage.

2019–2020 — Chain API and plugin architecture

53 changes.

This period focused on introducing a fluent, chainable API for query and update operations, alongside a new inner interceptor framework for dynamic table names and SQL rewriting. The team also expanded test coverage for core utilities, caching, optimistic locking, and multi-tenant isolation.

2021–2024 — JSqlParser integration and test expansion

47 changes.

This period focused on modernizing SQL parsing by integrating JSqlParser to replace legacy regex-based logic, introducing new interceptors for data permissions and multi-tenancy, and adding comprehensive test coverage across the codebase.

2025–2026 — JSR 5.0 parser and Spring Boot 4 support

17 changes.

This period focused on introducing JSqlParser 5.0 with advanced caching and thread pool management, alongside comprehensive test coverage for the new parsing infrastructure. Concurrently, the project added support for Spring Boot 4 and GraalVM native-image, while enhancing the code generator with index-based method creation and annotation support.

Features

Add Caffeine-based caching for Jsqlparser with async support

The MyBatis-Plus jsqlparser support module introduces a new caching layer backed by Caffeine to store parsed SQL statements. The change adds an abstract base class, \AbstractCaffeineJsqlParseCache\, which supports both synchronous and asynchronous write operations via \CompletableFuture\. Two concrete implementations are provided: \FstSerialCaffeineJsqlParseCache\ using FST serialization and \JdkSerialCaffeineJsqlParseCache\ using standard JDK serialization. This allows users to configure SQL parsing caches with high-performance, thread-safe storage that can optionally offload serialization to a custom executor.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/parser/cache · high confidence

Add Spring Boot 4 support module

The MyBatis-Plus Spring Boot 4 starter module is introduced, providing auto-configuration for Spring Boot 4. This includes new Spring Boot 4-specific resource files (spring.factories, AutoConfiguration.imports, and configuration metadata) that wire up MyBatis-Plus auto-configuration classes. Additionally, a comprehensive set of integration tests and supporting resources (entity, mapper, SQL schema, and application configuration) are added to verify the module's functionality.

spring-boot-starter/mybatis-plus-boot-starter/src/main, spring-boot-starter/mybatis-plus-spring-boot3-starter/src/main, spring-boot-starter/mybatis-plus-spring-boot4-starter · high confidence

Add native-image support for MyBatis-Plus via AOT runtime hints

This change introduces GraalVM native-image support for MyBatis-Plus by adding a new \MybatisPlusFeature\ and associated AOT utilities (\CollectUtils\, \FeatureUtils\) that register reflection, resource, and serialization hints. The \MyBaitsRuntimeHintsRegistrar\ ensures XML mapper files are correctly registered for native-image compilation, and Spring Boot auto-configuration is wired via \AutoConfiguration.imports\. Tests are added to verify the runtime hints generation.

spring-boot-starter/mybatis-plus-spring-boot-native-image · high confidence

Added DDL history tracking for MySQL, Oracle, PostgreSQL, and SQLite

MyBatis-Plus now automatically maintains a history of executed DDL scripts to prevent duplicate execution. This feature introduces a new \IDdlGenerator\ interface and specific implementations for MySQL, Oracle, PostgreSQL, and SQLite. Each implementation creates a \ddl\_history\ table to track script versions and types, ensuring that DDL changes are applied only once. For Oracle, the schema can be explicitly specified; for PostgreSQL, the schema defaults to 'public' but can be customized; for MySQL and SQLite, the history table is created in the default schema. This change modifies the behavior of DDL execution by introducing this tracking mechanism, which was previously absent for these databases.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/ddl/history · high confidence

Added JSqlParser-based data permission, multi-table data permission, and tenant line handlers

The mybatis-plus-jsqlparser module introduces three new interfaces to support SQL parsing and modification via JSqlParser: DataPermissionHandler for single-table data permission filtering, MultiDataPermissionHandler for multi-table scenarios (with a deprecated legacy method), and TenantLineHandler for multi-tenant row-level filtering. These interfaces allow users to define custom logic for injecting WHERE clauses for data access control and tenant isolation.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/plugins/handler · high confidence

Added MyBatis-Plus test auto-configuration for Spring Boot 3

The MyBatis-Plus library now includes dedicated test starters for Spring Boot 3, providing \AutoConfigureMybatisPlus\ and related auto-configuration classes to simplify testing with Spring Boot 3. This change introduces new test modules (\mybatis-plus-spring-boot3-starter-test\) that mirror the existing Spring Boot 2/4 test support, enabling developers to run integration tests using the \@MybatisPlusTest\ annotation with Spring Boot 3's auto-configuration system.

spring-boot-starter/mybatis-plus-boot-starter-test, spring-boot-starter/mybatis-plus-spring-boot3-starter-test · high confidence

Added database keyword handling for code generation

The code generator now includes a new keyword-handling system to properly escape reserved words in generated SQL. This change introduces a base handler and specific implementations for H2, MySQL, and PostgreSQL, ensuring that column names matching database keywords are correctly formatted in the output.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/keywords · high confidence

Added dynamic table name handler interface

A new interface, TableNameHandler, has been added to the MyBatis-Plus extension module. This interface defines a method for generating dynamic table names based on the executed SQL and the original table name, enabling custom logic for table name resolution.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/handler · high confidence

Added index-based mapper method generation for MyBatis-Plus code templates

The MyBatis-Plus generator now supports automatic creation of query, update, and delete methods based on database indexes. This is implemented via new classes in the \com.baomidou.mybatisplus.generator.index\ package: an \AbstractMapperMethodHandler\ base class, a \DefaultGenerateMapperMethodHandler\ for standard string/constant-based queries, and a \DefaultGenerateMapperLambdaMethodHandler\ for lambda-based queries. Both handlers support Java and Kotlin, handle composite indexes, and by default generate methods only for single-column indexes (configurable via \singleIndex\).

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/index · high confidence

Added p6spy SQL logging support

Added new classes in the \mybatis-plus-extension\ module to integrate p6spy for SQL logging. This includes \MybatisPlusLogFactory\ and \MybatisPlusLoggingEventListener\ to handle JDBC event listening and \P6SpyLogger\ to format SQL output, along with \StdoutLogger\ to print the logs to the console.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/p6spy · high confidence

Expanded code generation support for diverse database engines

The code generator now supports a significantly wider range of database platforms, including ClickHouse, DB2, DM (Dameng), Firebird, GBase, KingbaseES, Oscar, and Xugu, alongside existing support for MySQL, Oracle, PostgreSQL, SQL Server, and others. This is achieved by introducing an \AbstractDbQuery\ base class and implementing specific query handlers for each supported database, allowing the generator to correctly retrieve table and column metadata for code generation from these diverse systems.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/querys · high confidence

Expanded database support for pagination across multiple dialects

The pagination plugin now supports a wider range of databases, including DB2, GBase 8s, GaussDB, Hive 2, Informix, Oracle 12c, Trino, and XCloud, each with specific SQL generation logic. The refactored \IDialect\ interface and new dialect implementations ensure correct pagination syntax for each database, improving compatibility and performance for users querying these systems.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination/dialects · high confidence

Expanded database support in code generator

The code generator now supports code generation for additional databases, including ClickHouse, DB2, DM (Dameng), Firebird, GaussDB, KingbaseES, and Oscar. This allows users to generate entity classes and mapper code for these specific database systems.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts · high confidence

Introduce Caffeine-based caching for JSQLParser results

Added a new caching layer for JSQLParser results using Caffeine. The change introduces the \JsqlParseCache\ interface and an \AbstractCaffeineJsqlParseCache\ base class that supports both synchronous and asynchronous storage. Two concrete implementations are provided: \FstSerialCaffeineJsqlParseCache\ for FST serialization and \JdkSerialCaffeineJsqlParseCache\ for JDK serialization. This allows the framework to cache parsed SQL statements, improving performance by avoiding repeated parsing.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/parser/cache · high confidence

Introduce ChainUpdate interface for fluent update and delete operations

A new ChainUpdate interface has been added to the mybatis-plus-extension module, providing fluent update and delete capabilities. This interface extends ChainWrapper and adds default methods for updating an entity (with optional automatic filling) and removing records via a query wrapper, enabling a more concise and chainable API for these operations.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/conditions/update · high confidence

Introduces Kotlin-specific Query and Update wrappers with chain-style API

Added new Kotlin wrapper classes (AbstractKtWrapper, KtQueryWrapper, KtQueryChainWrapper, KtUpdateWrapper, KtUpdateChainWrapper) that provide a fluent, chainable API for building SQL queries and updates using Kotlin lambda expressions. These classes enable Kotlin users to construct MyBatis-Plus queries and updates with type-safe property references, supporting dynamic parameters, increment/decrement operations, and chain-style method calls.

mybatis-plus-extension/src/main/kotlin · high confidence

Introduces MybatisPlusInterceptor as the central plugin hub

The MybatisPlusInterceptor class has been added to the plugins package, serving as the primary entry point for registering and managing MyBatis interceptors. This new component implements the MyBatis Interceptor interface and delegates execution to a list of InnerInterceptor instances, supporting both query and update operations as well as statement handler modifications. The package-info.java file was also added to document the plugins package.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins · high confidence

Introduces Spring Boot auto-configuration for MyBatis-Plus

The MyBatis-Plus Spring Boot starter now includes a comprehensive set of auto-configuration classes that automatically wire up core components such as the SQL session factory, interceptors, and language drivers. This update adds support for executing DDL scripts at application startup, enables encrypted property resolution via environment variables, and provides a callback interface to customize the MyBatis configuration. These changes streamline the setup process for Spring Boot applications, allowing for automatic bean registration and configuration without manual XML or Java-based setup.

spring-boot-starter/mybatis-plus-spring-boot-autoconfigure/src/main · high confidence

Introduces custom Mybatis-Plus core classes to replace standard Mybatis components

The library now provides its own implementations for several core Mybatis classes, including MybatisConfiguration, MybatisMapperBuilderAssistant, MybatisSqlSessionFactoryBuilder, MybatisXMLConfigBuilder, MybatisXMLLanguageDriver, and MybatisXMLScriptBuilder. These custom classes replace the default Mybatis counterparts to enable features such as dynamic mapper injection via GroovyClassLoader, optimized memory usage for SQL nodes, and enhanced JSON type handler support.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core · high confidence

Introduces dedicated thread pool and expression append mode for JSqlParser

Adds a new JsqlParserThreadPool class that provides a fixed-size, daemon thread pool for SQL parsing, including a shutdown hook to ensure clean termination. Also introduces the ExpressionAppendMode enum, which allows users to specify whether appended expressions should be placed at the beginning (FIRST) or end (LAST) of the query.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-common · medium confidence

New Caffeine-based caching implementations for jsqlparser

Added a new caching layer for jsqlparser using Caffeine, providing multiple serialization strategies including JDK, FST, and Fury. The change introduces an abstract base class \AbstractCaffeineJsqlParseCache\ and concrete implementations (\FstSerialCaffeineJsqlParseCache\, \FurySerialCaffeineJsqlParseCache\, \JdkSerialCaffeineJsqlParseCache\) that allow users to choose their preferred serialization method for caching parsed SQL statements.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/parser/cache · high confidence

New ChainQuery interface for simplified query operations

A new ChainQuery interface has been added to the mybatis-plus-extension module, providing a fluent API for common query operations. This includes methods for retrieving lists, single records, counts, and paginated results, as well as a convenience method to check if any records exist. This change introduces a new way to perform queries using the ChainWrapper pattern, enhancing the library's query capabilities.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/conditions/query · high confidence

New DDL script execution and error handling API

Added new classes to the \mybatis-plus-extension\ module to support automated DDL maintenance and SQL script execution. \DdlHelper\ provides static methods to run SQL scripts with configurable error handling and custom \ScriptRunner\ consumers. \DdlScript\ offers a builder-style API for executing scripts, including support for custom script runners. \DdlScriptErrorHandler\ introduces a functional interface for handling script execution errors, with built-in strategies to either log and continue or throw exceptions to stop execution. \IDdl\ defines the interface for DDL processors.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/ddl · high confidence

New JSON type handlers and map wrapper for flexible serialization

The extension module now provides built-in type handlers for multiple JSON libraries, allowing users to map JSON columns to Java objects using Jackson, Jackson 3, Gson, Fastjson, or Fastjson2. An abstract base handler standardizes serialization and deserialization, while specific implementations (JacksonTypeHandler, Jackson3TypeHandler, GsonTypeHandler, FastjsonTypeHandler, Fastjson2TypeHandler) each delegate to their respective library's API. Additionally, a new MybatisMapWrapper is introduced to automatically convert database column names from underscore format to camelCase when mapping to Map results.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/handlers · high confidence

New JSqlParser integration classes for SQL parsing

Added new classes to the MyBatis-Plus JSqlParser support module: JsqlParserFunction functional interface, JsqlParserGlobal for managing the parsing thread pool and cache, and JsqlParserSupport as an abstract base class for processing SQL statements (INSERT, SELECT, UPDATE, DELETE). These changes introduce a new mechanism for parsing and processing SQL statements using JSqlParser, with support for caching parsed statements and configurable thread pools for parsing operations.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/parser · high confidence

New JSqlParser-based inner interceptors for dynamic table names, data permissions, and multi-tenant logic

The MyBatis-Plus \mybatis-plus-jsqlparser\ module introduces a suite of new inner interceptors built on JSqlParser: \DynamicTableNameJsqlParserInnerInterceptor\ and \DynamicTableNameHandler\ for dynamic table name resolution, \DataPermissionInterceptor\ for row-level data access control, \TenantLineInnerInterceptor\ for multi-tenant filtering, and \BlockAttackInnerInterceptor\ to prevent accidental full-table updates/deletes. These replace or augment the previous regex-based parsing, enabling more robust SQL modification and validation. Additionally, \BaseMultiTableInnerInterceptor\ provides a shared base for multi-table query processing, and \IllegalSQLInnerInterceptor\ and \DataChangeRecorderInnerInterceptor\ are marked as deprecated in favor of the new parser-driven implementations.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner · high confidence

New JSqlParser-based interceptors and handler interfaces for multi-table and data permission logic

The MyBatis-Plus JSqlParser support module introduces a suite of new inner interceptors and handler interfaces to modernize SQL parsing and filtering. New handler interfaces, including DataPermissionHandler, MultiDataPermissionHandler, and TenantLineHandler, provide standardized contracts for data permission and multi-tenant logic. These are implemented by new interceptors such as DataPermissionInterceptor, TenantLineInnerInterceptor, and BaseMultiTableInnerInterceptor, which handle complex multi-table and multi-tenant scenarios using the JSqlParser. Additionally, the update includes a new DynamicTableNameJsqlParserInnerInterceptor for dynamic table name resolution, alongside legacy interceptors like BlockAttackInnerInterceptor, DataChangeRecorderInnerInterceptor, and IllegalSQLInnerInterceptor, which provide SQL security, auditing, and syntax validation capabilities.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner · high confidence

New MyBatis template language drivers for FreeMarker, Thymeleaf, and Velocity

Added three new language drivers—MybatisFreeMarkerLanguageDriver, MybatisThymeleafLanguageDriver, and MybatisVelocityLanguageDriver—that extend the standard MyBatis template engine drivers to use MyBatis-Plus's custom MybatisParameterHandler for parameter processing.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/scripting · high confidence

New MybatisMapWrapperFactory for Map result-set camelCase conversion

A new MybatisMapWrapperFactory has been added to the mybatis-plus-extension module. This factory enables automatic conversion of Map result-set keys from underscore to camelCase, allowing users to configure it via configuration.setObjectWrapperFactory(new MybatisMapWrapperFactory()) to get camelCase keys in their Map results.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension · high confidence

New MybatisPlusTest annotation for Spring Boot testing

Added the \@MybatisPlusTest\ annotation and supporting classes (\AutoConfigureMybatisPlus\, \MybatisPlusTestContextBootstrapper\, \MybatisPlusTypeExcludeFilter\) to the \mybatis-plus-spring-boot-test-autoconfigure\ module. This provides a dedicated test slice for MyBatis-Plus components, allowing tests to focus exclusively on MyBatis-based components with an embedded in-memory database by default, while disabling full auto-configuration.

spring-boot-starter/mybatis-plus-spring-boot-test-autoconfigure · high confidence

New Query condition interface and LambdaQueryWrapper implementation

The MyBatis-Plus core library introduces a new \Query\ interface and a \LambdaQueryWrapper\ class to support lambda-style query conditions. This change adds a new \LambdaQueryWrapper\ implementation that allows for type-safe, lambda-based query construction, alongside a \Query\ interface that standardizes the \select\ method signatures for specifying query columns. The \QueryWrapper\ class is also updated to implement this new \Query\ interface, ensuring consistent behavior across both standard and lambda-based query wrappers.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/query · high confidence

New SQL injection methods for selective updates, batch inserts, and upserts

The \mybatis-plus-extension\ module adds several new SQL injector methods to the \injector.methods\ package: \AlwaysUpdateSomeColumnById\ for updating specific columns by ID, \InsertBatchSomeColumn\ for batch inserting with selective fields, \Upsert\ for insert-or-update operations, and \LogicDeleteByIdWithFill\ / \LogicDeleteBatchByIds\ for logical deletion with field filling. These classes provide new capabilities for fine-grained SQL generation and batch operations.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/injector/methods · high confidence

New SQL keyword and method enums for query construction

The library introduces new enum types to support SQL generation: \SqlKeyword\ defines standard SQL reserved keywords (e.g., AND, OR, LIKE, WHERE), \SqlLike\ specifies wildcard patterns for LIKE clauses, \WrapperKeyword\ handles internal wrapper markers, and \SqlMethod\ defines templates for common database operations (insert, delete, update, select). These enums provide the foundational building blocks for constructing dynamic SQL statements within the MyBatis-Plus framework.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/enums · high confidence

New SQL utility classes for injection checks and script generation

Added new utility classes in the \com.baomidou.mybatisplus.core.toolkit.sql\ package: \SqlInjectionUtils\ for validating and detecting SQL injection patterns, \SqlScriptUtils\ for generating MyBatis XML script fragments (if, trim, choose, foreach, where, set), \SqlUtils\ for handling SQL placeholders and column escaping, \SqlTemplate\ functional interfaces for formatted SQL templates, and \StringEscape\ for database string escaping. These tools provide safer SQL construction and validation capabilities for users.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/sql · high confidence

New SqlRunner interface and implementation for simplified SQL execution

Added the \ISqlRunner\ interface and \AbstractSqlRunner\ implementation in the \com.baomidou.mybatisplus.core.assist\ package, providing a streamlined way to execute SQL statements (insert, delete, update, select) with support for single-argument parameter extraction (Map, Array, List, JavaBean) using \{0}\ or \{property}\ placeholders.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/assist · high confidence

New Update and UpdateWrapper classes for SQL update operations

The MyBatis-Plus core library introduces new \Update\ interface and \UpdateWrapper\ class to handle SQL UPDATE statements. The \Update\ interface defines methods for setting update values (\set\), raw SQL fragments (\setSql\), and increment/decrement operations (\setIncrBy\, \setDecrBy\). The \UpdateWrapper\ class implements this interface, providing a fluent API to build UPDATE conditions, including support for SQL injection checks, parameter aliasing, and lambda-based wrappers. This change adds new capabilities for constructing UPDATE queries with dynamic parameters and improved security checks.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/update · high confidence

New batch execution API via BatchMethod, BatchSqlSession, and ParameterConvert

Added three new classes in the \mybatis-plus-core\ module to support batch operations: \BatchMethod\ to hold a statement ID and an optional parameter converter, \BatchSqlSession\ to wrap an existing \SqlSession\ and automatically flush pending batch statements before executing select operations, and \ParameterConvert\ as a functional interface for transforming entity parameters. These changes introduce a new way to perform batch operations while safely mixing in read queries.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/batch · high confidence

New branching selection API for code generation

The code generator now includes a new \select\ package containing \Branch\, \BranchBuilder\, and \Selector\ classes. This introduces a fluent API for defining conditional logic during code generation, allowing users to select specific outputs based on testable conditions. This change modifies the internal structure of the generator's configuration, potentially affecting how custom code generation templates or strategies are applied.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts/select · high confidence

New chainable query API for simplified condition building

A new chainable query API is introduced via the new \AbstractChainWrapper\ and \ChainWrapper\ classes in the \mybatis-plus-extension\ module. This provides a fluent, builder-style interface for constructing query conditions, allowing users to chain method calls for cleaner and more readable code when building complex WHERE clauses.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/conditions · high confidence

New code generation rules for database-to-entity type mapping and naming strategies

The code generator now includes new configuration rules in the \com.baomidou.mybatisplus.generator.config.rules\ package to control how database columns are mapped to Java entity fields. A new \DateType\ enum allows users to choose between \java.util.Date\, \java.sql.\\ types, or Java 8 \java.time.\\ types (including \Instant\) for date/time fields. The \DbColumnType\ enum explicitly defines the Java type and package for each database column, supporting basic types, wrappers, SQL types, and Java 8 date/time types. Additionally, the \NamingStrategy\ enum and helper methods provide utilities for converting table names to camelCase, and removing prefixes or suffixes from generated entity names.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/rules · high confidence

New fill and naming interfaces for code generation

The code generator now includes new classes and interfaces to support field and property filling as well as custom file naming. Specifically, the \Column\ and \Property\ classes in the \fill\ package implement the \IFill\ interface to handle column and property fill logic, while the \ConverterFileName\ functional interface in the \function\ package allows users to provide custom logic for converting entity names into output file names.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/fill, mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/function · high confidence

New inner interceptor plugin for dynamic table names

The MyBatis-Plus extension module now includes a new \DynamicTableNameInnerInterceptor\ that allows users to dynamically modify table names in SQL statements at runtime. This feature enables dynamic table routing or sharding logic by providing a \TableNameHandler\ callback. The change also introduces the \InnerInterceptor\ interface and related interceptors (\OptimisticLockerInnerInterceptor\, \ReplacePlaceholderInnerInterceptor\) that form the basis for these new plugin capabilities.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner · high confidence

New jsqlparser 5.0 interceptors and handlers

Added a new set of inner interceptors and handler interfaces for the jsqlparser 5.0 module, including \DynamicTableNameHandler\, \DataPermissionHandler\, \MultiDataPermissionHandler\, \TenantLineHandler\, \BaseMultiTableInnerInterceptor\, \BlockAttackInnerInterceptor\, \DataChangeRecorderInnerInterceptor\, \DataPermissionInterceptor\, \DynamicTableNameJsqlParserInnerInterceptor\, \IllegalSQLInnerInterceptor\, and \PaginationInnerInterceptor\. These components provide the underlying SQL parsing, multi-table condition processing, data permission, tenant line, and pagination logic for the updated parser version.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner · high confidence

New key generation interfaces for database sequences

The \com.baomidou.mybatisplus.core.incrementer\ package now includes the \IKeyGenerator\ interface, which defines the contract for generating SQL for database sequences, and the \IdentifierGenerator\ interface, which handles application-side ID generation and UUID creation. These new interfaces allow for more flexible key generation strategies, including support for multiple data sources as indicated by the associated fix for issue \#3225.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/incrementer · high confidence

New key generators for DB2, DM, Firebird, H2, Kingbase, Lealone, Oracle, PostgreSQL, and SAP HANA

The extension module now includes dedicated key generators for DB2, DM, Firebird, H2, Kingbase, Lealone, Oracle, PostgreSQL, and SAP HANA. Each implementation provides the SQL required to generate the next value for database sequences, enabling MyBatis-Plus to support auto-incrementing primary keys on these platforms.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/incrementer · high confidence

New model classes for annotation generation

The code generator now includes new model classes, AnnotationAttributes and ClassAnnotationAttributes, to support the generation of entity class annotations. These classes manage annotation attributes, import packages, and display names, enabling the generator to produce more complex annotation structures for entity classes.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/model · high confidence

New programmatic API to temporarily override interceptor ignore settings

MyBatis-Plus introduces a new \IgnoreStrategy\ class and an \InterceptorIgnoreHelper\ utility that allow developers to programmatically enable or disable specific interceptors (such as tenant line, dynamic table name, block attack, illegal SQL, and data permission) for the current thread. This provides a higher-priority, manual override mechanism that supersedes the \@InterceptorIgnore\ annotation, enabling fine-grained control over which SQL operations are intercepted during specific code blocks.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/plugins · high confidence

New query condition interfaces for building SQL clauses

The MyBatis-Plus core library introduces a new \com.baomidou.mybatisplus.core.conditions.interfaces\ package containing interfaces (\Compare\, \Func\, \Join\, \Nested\) that define the API for constructing SQL query conditions. These interfaces expose methods for comparison operators (e.g., \eq\, \ne\, \gt\), null checks (\isNull\, \isNotNull\), set operations (\in\, \notIn\), logical grouping (\and\, \or\, \nested\), and raw SQL injection points (\apply\, \exists\, \last\, \comment\). This change provides a structured, chainable way to build dynamic SQL conditions.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/interfaces · high confidence

New repository abstraction for simplified data access

A new \IRepository\ interface and \AbstractRepository\ implementation have been added to the \mybatis-plus-extension\ module. This introduces a higher-level repository pattern that wraps the existing \BaseMapper\ to provide a more convenient API for common CRUD operations, including batch save/update, delete by ID or collection, and single/multiple entity queries. Users can now extend \AbstractRepository\ to access these simplified methods without directly invoking MyBatis-Plus mappers.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/repository · high confidence

New utility classes for code generation

The code generator now includes new utility classes: ClassUtils for class name handling, FileUtils for directory creation, KotlinTypeUtils for mapping Java types to Kotlin types, and RuntimeUtils for opening output directories in the OS file explorer.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/util · high confidence

New utility classes for encryption, assertions, and reflection

Added new utility classes in the core toolkit: AES for AES CBC encryption/decryption, Assert for validation checks, AopUtils for extracting Spring proxy targets, and AnnotationUtils for finding annotations. These additions provide built-in support for secure password handling, code assertions, and reflection-based proxy resolution.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit · high confidence

New utility classes for simplified database operations and chain-style queries

Added new utility classes in the \mybatis-plus-extension\ module to streamline common database interactions. The \Db\ class provides static methods for save, update, and delete operations, allowing developers to perform CRUD actions without explicitly managing mappers or sessions. The \ChainWrappers\ class offers factory methods to easily construct chain-style query and update wrappers. Additionally, \SimpleQuery\ introduces a fluent API for executing simple queries, mapping results to maps or lists, and performing group-by operations with optional parallel stream support. \SqlHelper\ and \JdbcUtils\ provide foundational helpers for SQL execution and JDBC URL parsing, while \AbstractModel\ supports the Active Record pattern for entity classes.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/toolkit · high confidence

Project initialization and documentation update

The repository was initialized with essential project configuration files, including \.editorconfig\ for consistent code formatting, a \.gitignore\ to exclude build artifacts and IDE files, and a \CHANGELOG.md\ documenting version history and features. Additionally, the \README.md\ and \README-zh.md\ files were updated to provide comprehensive project descriptions, feature lists, and dependency usage examples for Spring Boot 2, 3, and 4.

(repo-wide) · high confidence

Refactored core Mybatis-Plus components to improve mapper injection and batch processing

The core module introduces several new classes to handle mapper and SQL injection more effectively. MybatisMapperRegistry now manages mapper proxy factories and handles mapper registration with improved logic for loading XML and annotation-based mappers. MybatisMapperAnnotationBuilder and MybatisXMLMapperBuilder are introduced to parse mapper interfaces and XML configurations, respectively, allowing for better integration with MyBatis internals. Additionally, MybatisParameterHandler is added to process parameters for insert and update operations, handling field filling and logic delete values. The new MybatisBatch class provides a dedicated API for executing batch operations with configurable batch sizes and auto-commit options. These changes collectively enhance the framework's ability to dynamically inject SQL methods and manage mapper states more robustly.

. · high confidence

Refactored core handlers into new interfaces and classes

The \mybatis-plus-core\ module introduces several new handler classes and interfaces to support enhanced metadata and type handling. \AnnotationHandler\ provides a standardized way to retrieve and check annotations on classes, fields, and methods. \CompositeEnumTypeHandler\ manages enum type handling with a configurable default handler. \IJsonTypeHandler\ defines the contract for JSON serialization and deserialization. \MetaObjectHandler\ is refactored into an interface with default methods for insert/update filling and strict filling operations. \PostInitTableInfoHandler\ allows for post-initialization of \TableInfo\ and \TableFieldInfo\. \StrictFill\ is a new model for strict fill mode operations.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/handlers · high confidence

Refactored metadata and pagination interfaces

The \IPage\ interface has been moved to the \core.metadata\ package and expanded with new methods including \optimizeCountSql\, \optimizeJoinOfCountSql\, \searchCount\, \offset\, \maxLimit\, and \countId\. A new \convert\ method allows functional mapping of page records. Additionally, new classes \MapperProxyMetadata\, \OrderFieldInfo\, and \OrderItem\ have been introduced to handle proxy metadata and sorting logic, while \TableInfo\ and \TableFieldInfo\ have been refactored to support new properties like \autoInitResultMap\ and \isOrderBy\.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata · high confidence

Architecture

Refactored SQL condition wrapper architecture

The \mybatis-plus-core\ module introduces a refactored condition-building architecture. A new \AbstractLambdaWrapper\ class is added to handle lambda-based column resolution, while \AbstractWrapper\ is expanded to support dynamic parameter aliases, SQL comments, and custom SQL segments. The \Wrapper\ base class is updated with new methods for checking empty conditions and retrieving target SQL, and a \SharedString\ utility class is added to manage shared string states. These changes improve the internal structure and extensibility of the query and update wrappers.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions · high confidence

Behavioural changes

Add manual override for CompatibleSet via new SPI helper

A new \CompatibleHelper\ class has been introduced in the \mybatis-plus-extension\ module to manage the \CompatibleSet\ interface. This change allows users to manually specify a \CompatibleSet\ implementation via the new \setCompatibleSet()\ method, providing an alternative to the default ServiceLoader-based loading mechanism. The \CompatibleSet\ interface itself is marked as deprecated in version 3.5.12, signaling a shift in how compatibility layers are handled within the framework.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/spi · high confidence

Added Spring Boot DevTools restart configuration for MyBatis-Plus

A new spring-devtools.properties file has been added to the MyBatis-Plus core module, configuring the Spring Boot DevTools restart mechanism to include MyBatis-Plus JARs in the restart classpath. This allows changes in MyBatis-Plus dependencies to be detected and hot-reloaded during development without requiring a full application restart.

mybatis-plus-core/src/main/resources · low confidence

Added built-in generic type extraction to support non-Spring projects

A new built-in generic type extraction mechanism has been introduced, allowing the framework to function without a hard dependency on the Spring Framework. This is achieved by adding a new \IGenericTypeResolver\ interface and a \TypeParameterResolver\ class that handles type parameter resolution using standard Java reflection. The existing \GenericTypeUtils\ class now acts as a facade that can either use this built-in resolver or fall back to Spring's \GenericTypeResolver\ if available, effectively isolating the core library from Spring's implementation details.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/reflect · high confidence

Code generator refactored with new handler interfaces and builder classes

The code generator has been refactored to support pluggable annotation and method generation. New interfaces (ITableAnnotationHandler, ITableFieldAnnotationHandler, IGenerateMapperMethodHandler, ITemplate) and their default implementations (DefaultTableAnnotationHandler, DefaultTableFieldAnnotationHandler) allow customizing how entity classes and mapper methods are generated. The main entry points have been updated: AutoGenerator now uses a builder-style configuration (ConfigBuilder) and supports custom template engines, while FastAutoGenerator provides a fluent API for rapid setup. Additionally, ITableFieldMetaInfoCustomizer enables runtime customization of field metadata before template rendering.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator · high confidence

Introduce GlobalConfig for centralized MyBatis-Plus configuration

The MyBatis-Plus framework now provides a centralized \GlobalConfig\ class to manage global settings, replacing scattered configuration approaches. This new configuration object allows users to define default behaviors for database interactions, including table and column naming formats, logical delete field mappings, and SQL injection strategies. By consolidating these settings, the update simplifies the initialization process and ensures consistent behavior across the application.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/config · medium confidence

Introduces SPI-based CompatibleSet interface and CompatibleHelper for container context and proxy resolution

MyBatis-Plus 3.5.12 adds a new SPI-based mechanism to resolve container context and proxy targets. A new \CompatibleSet\ interface is introduced with default methods for \getBean\, \getProxyTargetObject\, and \setContext\, allowing the framework to interact with external dependency injection containers and resolve actual proxy objects. A new \CompatibleHelper\ class manages the loading of \CompatibleSet\ implementations via \ServiceLoader\, enabling users to either provide a custom \CompatibleSet\ implementation or use the default behavior. This change supports fixing issues where container context objects were null during initialization and ensures batch operations return result sets based on actual rows.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/spi · medium confidence

Major refactoring of annotation and enum classes in mybatis-plus-annotation

The \mybatis-plus-annotation\ module has been significantly refactored, primarily by moving all annotation and enum classes (such as \DbType\, \TableField\, \TableName\, \FieldStrategy\, etc.) from the core module into this dedicated annotation module. This change isolates the annotation definitions, ensuring that the core library does not depend on them directly, and provides a cleaner separation of concerns for users who only need the annotation definitions.

mybatis-plus-annotation · high confidence

MyBatis-Plus introduces a custom exception hierarchy

The library now provides a dedicated exception class, MybatisPlusException, which extends MyBatis's PersistenceException. This change allows users to catch a specific, unified exception type for all MyBatis-Plus related errors, rather than handling multiple or generic exceptions.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/exceptions · high confidence

New SQL parser infrastructure with thread pool and caching support

The MyBatis-Plus JSqlParser 5.0 module introduces new classes to manage SQL parsing: JsqlParserGlobal now provides a configurable ExecutorService for parsing operations, including support for JVM shutdown hooks to properly close thread pools, and integrates with a JsqlParseCache for result caching. A new JsqlParserFunction functional interface and JsqlParserSupport abstract class are added to handle single and multi-statement parsing, routing through the global configuration. This changes how SQL parsing is executed and cached, offering better resource management and performance for SQL modification features.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/parser · high confidence

New database query abstraction for code generation

The code generator now introduces a new \IDatabaseQuery\ interface and an \AbstractDatabaseQuery\ base class in the \query\ package. This refactors how the generator retrieves and filters table metadata from the database, providing a cleaner, more extensible way to handle table inclusion/exclusion logic during code generation.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/query · medium confidence

New type conversion interface and registry for code generation

The code generator now uses a new \ITypeConvertHandler\ interface and a \TypeRegistry\ class to map database column types to Java types. This refactors how the generator determines the Java type for each field, supporting mappings for binary, numeric, string, date, and timestamp types, and allowing the date type to be configured via \GlobalConfig\.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/type · medium confidence

Refactored JSQLParser integration with improved thread pool and shutdown handling

The JSQLParser integration has been refactored to improve thread pool management and resource cleanup. A new functional interface, JsqlParserFunction, was introduced to support flexible parsing operations. The JsqlParserGlobal class now provides explicit methods to configure the parsing thread pool, including support for custom ExecutorService instances and configurable shutdown hooks to ensure proper resource cleanup during JVM exit. Additionally, the JsqlParserSupport class was updated to utilize the new global configuration, ensuring consistent SQL parsing behavior across the framework.

mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/parser · medium confidence

Refactored SQL injection architecture with new core classes

The SQL injection mechanism in the \com.baomidou.mybatisplus.core.injector\ package has been refactored. A new abstract base class \AbstractMethod\ is introduced to standardize method injection, while \DefaultSqlInjector\ now explicitly lists the default CRUD operations (Insert, Delete, Update, SelectCount, etc.) and conditionally adds ID-based methods only if a primary key is present. The \ISqlInjector\ interface and \SqlRunnerInjector\ are also part of this restructuring, which supports custom SQL injectors and improves the initialization of mapper methods. This change alters how SQL statements are automatically generated and injected into the MyBatis configuration.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/injector · medium confidence

Refactored SQL injection methods for CRUD operations

The \methods\ package in \mybatis-plus-core\ has been refactored to improve the structure and maintainability of SQL injection logic. New, dedicated classes have been introduced for core operations: \Delete\, \DeleteById\, \DeleteByIds\, \Insert\, \SelectById\, \SelectByIds\, \SelectByMap\, \SelectCount\, \SelectList\, \SelectMaps\, \SelectMapsPage\, \SelectObjs\, \SelectOne\, \SelectPage\, \SelectWithCursor\, \Update\, and \UpdateById\. Several existing methods, such as \SelectBatchByIds\, \DeleteBatchByIds\, and \SelectByMap\, are now marked as deprecated in favor of the new implementations. This change streamlines the internal architecture for handling MyBatis mapped statements, ensuring consistent behavior for select, insert, update, and delete operations.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/injector/methods · high confidence

Refactored SQL segment handling with new segment classes

The internal SQL segment handling has been refactored by introducing new classes: AbstractISegmentList, GroupBySegmentList, HavingSegmentList, MatchSegment, MergeSegments, NormalSegmentList, and OrderBySegmentList. This change reorganizes how SQL segments are managed and combined, which may affect the internal behavior of query conditions.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/conditions/segments · medium confidence

Refactored code generator configuration builder

The code generator's configuration handling has been refactored into a new \ConfigBuilder\ class, which centralizes the management of global, package, strategy, template, and injection settings. A new \GeneratorBuilder\ utility class provides static factory methods for creating default configuration objects, and a \PathInfoHandler\ class now manages output path generation. This change restructures how the generator processes configuration data, potentially affecting how users set up code generation templates and output paths.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/builder · medium confidence

Refactored code generator configuration with new interfaces and constants

The code generator's configuration layer has been refactored to support more flexible template handling and database interactions. A new \ConstVal\ interface centralizes template paths, file suffixes, and default values. New interfaces including \IConfigBuilder\, \IDbQuery\, \IKeyWordsHandler\, \IOutputFile\, and \ITypeConvert\ define the configuration and query contracts. Additionally, enums \OutputFile\, \TemplateLoadWay\, and \TemplateType\ standardize output types, template loading strategies (string vs. file), and template categories, providing a more structured approach to generator customization.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config · medium confidence

Refactored code generator data model classes

The code generator's data model classes (TableInfo, TableField, LikeTable) have been refactored, introducing new fields and methods to support enhanced metadata handling, annotation processing, and table/field name generation. This change improves how the generator handles database metadata, table prefixes, and entity/field annotations.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/po · high confidence

Refactored lambda expression metadata extraction to support Groovy, Kotlin, and IDE proxy types

The lambda metadata extraction logic in the core toolkit has been refactored to support a wider range of functional interfaces. A new \LambdaMeta\ interface and \SFunction\ interface are introduced to standardize lambda information. Specific implementations are added for different environments: \GroovyLambdaMeta\ for Groovy method references, \KotlinLambdaMeta\ for Kotlin property and function references, and \IdeaProxyLambdaMeta\ for IDE evaluation proxies. Additionally, \ReflectLambdaMeta\ and \ShadowLambdaMeta\ handle standard Java serialized lambdas, while \ColumnCache\ and \BiIntFunction\ provide supporting structures for column mapping and primitive function types.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/support · high confidence

Refactored pagination plugin with dynamic parameter support and new database dialects

The pagination plugin has been refactored to support dynamic SQL parameters, allowing for more flexible query construction. A new \DialectModel\ class and \DialectFactory\ have been introduced to manage database-specific SQL dialects, enabling support for additional databases including Trino, Presto, Hive2, GaussDB, and others. The \Page\ and \PageDTO\ classes have been updated to support these changes, with \PageDTO\ serving as a lightweight DTO for cross-service data transfer. The \IPage\ interface has been adjusted to include methods for optimizing count SQL and controlling search count behavior.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination · high confidence

Refactored template engine architecture with new template engine implementations

The code generator's template engine layer has been refactored to support multiple template engines (Beetl, Enjoy, Freemarker, Velocity) through a new abstract \AbstractTemplateEngine\ base class. This change introduces dedicated engine implementations for each supported template technology, allowing users to choose their preferred template engine for code generation. The refactoring also includes improvements to file output handling, template path resolution, and configuration building, providing a more modular and extensible foundation for template-based code generation.

mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/engine · medium confidence

Restructures core mapper interfaces and introduces new delete methods

The \BaseMapper\ interface is restructured with a new \Mapper\ super-interface and updated method signatures. Notably, \deleteBatchIds\ is deprecated in favor of \deleteByIds\, and \deleteById\ is enhanced to support entity-based deletion with optional field filling. These changes modify the existing API surface for data access operations.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/mapper · medium confidence

Spring integration refactored with new service/repository abstractions and SPI implementation

The \mybatis-plus-spring\ module has been restructured with a new package structure, introducing a Spring-specific \CompatibleSet\ implementation (\SpringCompatibleSet\) that provides Spring-aware methods such as \getProxyTargetObject()\ to retrieve the actual proxy target. The change also introduces new Spring integration classes including \MybatisPlusApplicationContextAware\ for managing the \ApplicationContext\, a custom \MybatisSqlSessionFactoryBean\ that replaces the standard MyBatis factory bean, and new service/repository abstractions (\IService\, \ServiceImpl\, \CrudRepository\) that provide batch save, update, and delete operations with transactional support. These changes improve Spring container integration and offer a more consistent API for service-layer operations.

mybatis-plus-spring/src/main · medium confidence

Updated code generation templates for Controller, Entity, Mapper, and Service layers

The code generator's default templates for Java and Kotlin have been updated across multiple template engines (Beetl, FreeMarker, Velocity, and Enjoy). These changes standardize the generation of Controller, Entity, Mapper, and Service layer files, ensuring consistent output for Spring Boot and MyBatis-Plus projects. Specifically, the templates now support conditional generation of service interfaces, handle Kotlin class inheritance and annotations correctly, and ensure proper import statements and class structures for both Java and Kotlin.

mybatis-plus-generator/src/main/resources · high confidence

Updated license header and added package-info for the override package

The license header in the MyBatis-Plus core module was updated to reflect the years 2011–2025. Additionally, a new \package-info.java\ file was added to the \com.baomidou.mybatisplus.core.override\ package, providing Javadoc documentation for the 'Page' refactoring logic.

mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/override · medium confidence

Upgrade Gradle wrapper to version 8.13

The project's Gradle wrapper has been updated to version 8.13. This change ensures that the build process uses a specific, modern version of the Gradle build tool, which may bring performance improvements, new features, or compatibility with newer Java versions. The wrapper configuration now points to the official Gradle distribution URL.

gradle · high confidence

Test coverage

Add H2-based unit tests for MyBatis-Plus core features; Add tests for custom ID generation; Add tests for generic primary key support; Added H2 key generator test configuration; Added H2 service layer test implementations; Added H2 test configuration classes for MyBatis-Plus; Added H2 test entity classes for MyBatis-Plus integration tests; Added H2 test enums for age, gender, and grade; Added H2 test mappers for MyBatis-Plus; Added H2-based test infrastructure for MyBatis-Plus; Added Java test entity for Kotlin lambda extraction tests; Added Kotlin property reference tests for Lambda wrappers; Added Kotlin unit tests for H2 database integration; Added Kotlin unit tests for MyBatis-Plus Spring module; Added Phoenix integration test configuration; Added Phoenix integration test fixtures; Added Phoenix test configuration and schema for integration tests; Added PostgreSQL integration tests; Added SQL schema for generator test cases; Added SQL schema for key generator tests; Added integration and configuration tests for the MyBatis-Plus Spring Boot starter; Added new test suite for native MyBatis integration and batch operations; Added performance test suite for field auto-fill; Added test coverage for JSqlParser integration and pagination logic; Added test coverage for Maven POM generation; Added test coverage for MyBatis-Plus JSQLParser support; Added test data for cache tests; Added test models for various ID generator types; Added test resources for MyBatis-Plus; Added test templates for code generation; Added test to verify Maven POM dependency scopes; Added test utilities for MyBatis code generation; Added tests for @OrderBy field sorting; Added tests for AOP-enhanced Mapper layer; Added tests for BaseMapper.selectOne behavior; Added tests for DDL script execution and SQL parsing utilities; Added tests for Groovy and IDEA proxy lambda meta; Added tests for Huawei GaussDB database support; Added tests for ImadcnIdentifierGenerator; Added tests for InterceptorIgnoreHelper; Added tests for JSqlParser-based SQL parsing and inner interceptors; Added tests for MyBatis-Plus cache functionality; Added tests for MyBatis-Plus core utilities; Added tests for MyBatis-Plus enum type handling; Added tests for MyBatis-Plus pagination and secondary cache behavior; Added tests for POM dependency verification and reflection utility; Added tests for Phoenix database integration; Added tests for SqlRunner database operations; Added tests for TableInfo core functionality; Added tests for TypeParameterResolver; Added tests for UUID-based entity deletion and logic delete with field filling; Added tests for auto-result-map with nested type handlers; Added tests for batch operation cache clearing; Added tests for dynamic logic-delete value filling; Added tests for field fill functionality; Added tests for field update/insert strategies; Added tests for generic primary key scenarios; Added tests for multi SqlSessionFactory support; Added tests for multi-tenant caching behavior; Added tests for multi-tenant plugin behavior and @Many annotation handling; Added tests for optimistic locking on single and batch updates; Added tests for optimistic locking with wrapper-based updates; Added tests for pagination dialect SQL generation; Added tests for repository scanning in MyBatis-Plus; Added tests for schema and tableName placeholder configuration; Added tests for the 'non' package; Added tests for the Record feature; Added tests for the ReplacePlaceholder inner interceptor; Added tests for various ID generator types; Added unit tests for JSON type handlers; Added unit tests for MetaObjectHandler and MybatisEnumTypeHandler; Added unit tests for MyBatis-Plus autoconfigure properties; Added unit tests for MyBatis-Plus code generator configuration and template rendering; Added unit tests for MyBatis-Plus core components; Added unit tests for MyBatis-Plus type handlers; Added unit tests for MyBatis-Plus wrapper conditions; Added unit tests for SQL utility classes; Added unit tests for TableInfoHelper metadata parsing; Added unit tests for core toolkit utilities; Added unit tests for inner SQL interceptors; Added unit tests for key generator models; Added unit tests for pagination dialects.

Dependencies

Migrate build system to Gradle and upgrade core dependencies

The project build system has been migrated from Maven to Gradle, introducing a new \build.gradle\ root script and per-module \build.gradle\ files. This update upgrades the core dependencies, including MyBatis 3.5.19, MyBatis-Spring 2.1.2/3.0.5/4.0.0, Spring Boot 2.7.18/3.5.9/4.0.1, and JSqlParser 4.9/5.0/5.2. Additionally, the project now supports Spring Boot 4 and introduces new modules for Spring Boot 3 and 4 starters, alongside updated test dependencies like JUnit 6.1.1 and AssertJ 3.27.7.

(dependencies) · high confidence

Housekeeping

Add package-info.java for the injector package

A new package-info.java file has been added to the mybatis-plus-extension injector package, providing Javadoc documentation for the package and updating the copyright header to 2011-2025.

mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/injector · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 59 → 66 (+6.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 82 → 86 (+3.9)
  • Architecture 100 → 93 (-6.9)
  • Maturity 57 → 57 (+0.1)
  • Readiness 74 → 75 (+0.3)
  • Security 49 → 65 (+16.6)

Resolved (54)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/index/DefaultGenerateMapperLambdaMethodHandler.java)
  • Duplicated block (11 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableFieldInfo.java)
  • Duplicated block (12 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisSqlSessionFactoryBuilder.java)
  • Duplicated block (17 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/ClassUtils.java)
  • Duplicated block (18 lines × 2) (mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts/FirebirdTypeConvert.java)
  • Duplicated block (18 lines × 2) (mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts/GaussDBSqlTypeConvert.java)
  • Duplicated block (19 lines × 2) (mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts/KingbaseESTypeConvert.java)
  • Duplicated block (5 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/mapper/BaseMapper.java)
  • Duplicated block (5 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/toolkit/AopUtils.java)
  • Duplicated block (5 lines × 2) (mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts/DB2TypeConvert.java)
  • Duplicated block (5 lines × 2) (mybatis-plus-generator/src/main/java/com/baomidou/mybatisplus/generator/config/converts/KingbaseESTypeConvert.java)
  • Duplicated block (5 lines × 2) (spring-boot-starter/mybatis-plus-spring-boot-native-image/src/main/java/com/baomidou/mybatisplus/aot/FeatureUtils.java)
  • Duplicated block (5 lines × 2) (spring-boot-starter/mybatis-plus-spring-boot-native-image/src/main/java/com/baomidou/mybatisplus/aot/FeatureUtils.java)
  • Duplicated block (5 lines × 2) (spring-boot-starter/mybatis-plus-spring-boot-native-image/src/main/java/com/baomidou/mybatisplus/aot/FeatureUtils.java)
  • Duplicated block (6 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisMapperAnnotationBuilder.java)
  • Duplicated block (6 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/injector/methods/DeleteById.java)
  • Duplicated block (6 lines × 2) (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/metadata/TableFieldInfo.java)
  • Duplicated block (6 lines × 2) (mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/plugins/pagination/dialects/GaussDBDialect.java)
  • …and 34 more

New (417)

  • BaseMultiTableInnerInterceptor.processJoins (cognitive 52) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/BaseMultiTableInnerInterceptor.java)
  • BaseMultiTableInnerInterceptor.processJoins (cognitive 52) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/BaseMultiTableInnerInterceptor.java)
  • BaseMultiTableInnerInterceptor.processJoins (cyclomatic 20) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/BaseMultiTableInnerInterceptor.java)
  • BaseMultiTableInnerInterceptor.processJoins (cyclomatic 20) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/BaseMultiTableInnerInterceptor.java)
  • BlockAttackInnerInterceptor.fullMatch (cognitive 20) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/BlockAttackInnerInterceptor.java)
  • BlockAttackInnerInterceptor.fullMatch (cognitive 20) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/BlockAttackInnerInterceptor.java)
  • ClassTooLong: DataChangeRecorderInnerInterceptor (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • ClassTooLong: DataChangeRecorderInnerInterceptor (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • ClassTooLong: DataChangeRecorderInnerInterceptor (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • ClassTooLong: MybatisMapperAnnotationBuilder (mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisMapperAnnotationBuilder.java)
  • CollectUtils.findClassesInDirectory (cognitive 16) (spring-boot-starter/mybatis-plus-spring-boot-native-image/src/main/java/com/baomidou/mybatisplus/aot/CollectUtils.java)
  • CollectUtils.getJarFilePath (cognitive 19) (spring-boot-starter/mybatis-plus-spring-boot-native-image/src/main/java/com/baomidou/mybatisplus/aot/CollectUtils.java)
  • DataChangeRecorderInnerInterceptor.dealWithUpdateWrapper (cognitive 23) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.dealWithUpdateWrapper (cognitive 23) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.detectInsertColumnValuesNonJdbcParameters (cognitive 25) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.detectInsertColumnValuesNonJdbcParameters (cognitive 25) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.getUpdatedColumnDatas (cognitive 35) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.getUpdatedColumnDatas (cognitive 35) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.getUpdatedColumnDatas (cyclomatic 18) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-4.9/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • DataChangeRecorderInnerInterceptor.getUpdatedColumnDatas (cyclomatic 18) (mybatis-plus-jsqlparser-support/mybatis-plus-jsqlparser-5.0/src/main/java/com/baomidou/mybatisplus/extension/plugins/inner/DataChangeRecorderInnerInterceptor.java)
  • …and 397 more

Architecture

  • Containers 0 added · 0 removed · contexts 11 added · 1 removed · edges 17 added · 0 removed

Added bounded contexts (11)

  • mybatis-plus
  • mybatis-plus-boot-starter
  • mybatis-plus-core
  • mybatis-plus-extension
  • mybatis-plus-generator
  • mybatis-plus-jsqlparser
  • mybatis-plus-jsqlparser-4.9
  • mybatis-plus-jsqlparser-5.0
  • mybatis-plus-spring-boot-native-image
  • mybatis-plus-spring-boot3-starter
  • mybatis-plus-spring-boot4-starter

Removed bounded contexts (1)

  • .

Added dependency edges (17)

  • mybatis-plus → mybatis-plus-core
  • mybatis-plus → mybatis-plus-extension
  • mybatis-plus-extension → mybatis-plus-core
  • mybatis-plus-generator → mybatis-plus-core
  • mybatis-plus-jsqlparser → mybatis-plus-core
  • mybatis-plus-jsqlparser → mybatis-plus-extension
  • mybatis-plus-jsqlparser → mybatis-plus-jsqlparser-4.9
  • mybatis-plus-jsqlparser → mybatis-plus-jsqlparser-5.0
  • mybatis-plus-jsqlparser-4.9 → mybatis-plus-core
  • mybatis-plus-jsqlparser-4.9 → mybatis-plus-extension
  • mybatis-plus-jsqlparser-4.9 → mybatis-plus-jsqlparser
  • mybatis-plus-jsqlparser-4.9 → mybatis-plus-jsqlparser-5.0
  • mybatis-plus-jsqlparser-5.0 → mybatis-plus-core
  • mybatis-plus-jsqlparser-5.0 → mybatis-plus-extension
  • mybatis-plus-jsqlparser-5.0 → mybatis-plus-jsqlparser
  • mybatis-plus-jsqlparser-5.0 → mybatis-plus-jsqlparser-4.9
  • mybatis-plus-spring-boot-native-image → mybatis-plus-spring-boot4-starter

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

baomidou/mybatis-plus was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit bf67d907478c724120bf76292da54abf9e73c2b3 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-f917f263222d.