Skip to content

Introduction

MyBatis-Plus is an enhancement toolkit for MyBatis. It builds upon MyBatis to provide additional capabilities without making any changes to the core framework, aiming to simplify development and improve efficiency.

Relationship Between MyBatis and MyBatis-Plus

Features

  • Non-invasive: Only enhances without altering existing functionality. Introducing it won’t impact your current project - it integrates smoothly
  • Minimal overhead: Automatically injects basic CRUD operations upon startup with virtually no performance impact, enabling direct object-oriented operations
  • Powerful CRUD operations: Built-in universal Mapper and Service. Achieve most single-table CRUD operations with minimal configuration, plus a powerful condition constructor to meet various needs
  • Lambda support: Write query conditions conveniently using Lambda expressions, eliminating worries about field name errors
  • Automatic primary key generation: Supports up to 4 primary key strategies (including distributed unique ID generator - Sequence), freely configurable to perfectly solve primary key issues
  • ActiveRecord mode support: Supports ActiveRecord-style calls. Entities simply need to inherit the Model class to perform powerful CRUD operations
  • Custom global operations: Supports global universal method injection (Write once, use anywhere)
  • Built-in code generator: Quickly generate Mapper, Model, Service, and Controller layer code using code or Maven plugins. Supports template engines with numerous custom configurations
  • Built-in pagination plugin: Based on MyBatis physical pagination. Developers don’t need to worry about specific operations - after configuring the plugin, pagination queries are as simple as regular List queries
  • Pagination plugin supports multiple databases: Supports MySQL, MariaDB, Oracle, DB2, H2, HSQL, SQLite, Postgre, SQLServer, and more
  • Built-in performance analysis plugin: Outputs SQL statements and their execution time. Recommended for development and testing to quickly identify slow queries
  • Built-in global intercept plugin: Provides intelligent analysis and blocking for full-table delete/update operations. Custom interception rules can be defined to prevent accidental operations

Supported Databases

Framework Structure

framework

Code Hosting

Contributing

We welcome all contributors to help improve MyBatis-Together! We look forward to your PR!

Tutorials, Examples, and User List

Please visit Awesome-MyBatis-Plus to view.

Baomidou

© 2016-2025 Baomidou™. All Rights Reserved.

Power by Astro Starlight | Sponsored by JetBrains

渝ICP备2021000141号-1 | 渝公网安备50011302222097