baomidou/mybatis-plus
baomidou/mybatis-plus has 17,486 GitHub stars and 4,434 forks. GitHot measured -1 stars in 24 hours and +5 in 7 days. Last checked 2026-11-11 12:43 UTC. Last push 2026-11-04.
Un potente kit de herramientas mejorado para MyBatis que simplifica el desarrollo.
What you can do
- Fully compatible with MyBatis
- Auto configuration on startup
- Out-of-the-box interfaces for operate database
- Powerful and flexible where condition wrapper
Crecimiento de estrellas medido
- in 24h
- -1
- in 7 days
- +5
- in 15 days
- Actualización retrasada
- in 1 month
- Actualización retrasada
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalBorn To Simplify Development
添加 微信 wx153666 备注进 mp 群
不允许非法项目使用,后果自负
Special user
What is MyBatis-Plus?
MyBatis-Plus is a powerful and enhanced toolkit of MyBatis for simplifying development. It provides efficient, and out-of-the-box features (such as code generation, conditional query builders, pagination plugins...), effectively saving development time
Links
Features
- Fully compatible with MyBatis
- Auto configuration on startup
- Out-of-the-box interfaces for operate database
- Powerful and flexible where condition wrapper
- Multiple strategy to generate primary key
- Lambda-style API
- Almighty and highly customizable code generator
- Automatic paging operation
- SQL Inject defense
- Support active record
- Support pluggable custom interface
- Build-in many useful extensions
Getting started
Add MyBatis-Plus dependency
Choose the starter for your Spring Boot version and replace Latest Version with the MyBatis-Plus version you want to use.
Spring Boot 4
Requires MyBatis-Plus 3.5.13 or later.
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot4-starter</artifactId>
<version>Latest Version</version>
</dependency>
Gradle:
implementation 'com.baomidou:mybatis-plus-spring-boot4-starter:Latest Version'
Test dependency (optional)
To write tests with @MybatisPlusTest, add the matching test starter using the same version as the starter above.
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot4-starter-test</artifactId>
<version>Latest Version</version>
<scope>test</scope>
</dependency>
Gradle:
testImplementation 'com.baomidou:mybatis-plus-spring-boot4-starter-test:Latest Version'
Spring Boot 3
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>Latest Version</version>
</dependency>
Gradle:
implementation 'com.baomidou:mybatis-plus-spring-boot3-starter:Latest Version'
Test dependency (optional)
To write tests with @MybatisPlusTest, add the matching test starter using the same version as the starter above.
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter-test</artifactId>
<version>Latest Version</version>
<scope>test</scope>
</dependency>
Gradle:
testImplementation 'com.baomidou:mybatis-plus-spring-boot3-starter-test:Latest Version'
Spring Boot 2
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>Latest Version</version>
</dependency>
Gradle:
implementation 'com.baomidou:mybatis-plus-boot-starter:Latest Version'
Test dependency (optional)
To write tests with @MybatisPlusTest, add the matching test starter using the same version as the starter above.
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter-test</artifactId>
<version>Latest Version</version>
<scope>test</scope>
</dependency>
Gradle:
testImplementation 'com.baomidou:mybatis-plus-boot-starter-test:Latest Version'
SQL parser dependency (optional)
Since MyBatis-Plus 3.5.9, plugins that parse SQL, such as the pagination plugin, require one of the following parser modules. Choose one module matching your JDK and required JSqlParser version, and use the same MyBatis-Plus version as the starter.
The JSqlParser versions below reflect the dependency configuration in the current repository. For other MyBatis-Plus releases, refer to the dependencies of that release.
| MyBatis-Plus module | JSqlParser version | JDK requirement |
|---|---|---|
mybatis-plus-jsqlparser |
5.4 | JDK 11+ |
mybatis-plus-jsqlparser-5.2 |
5.2 | JDK 11+ |
mybatis-plus-jsqlparser-5.0 |
5.0 | JDK 11+ |
mybatis-plus-jsqlparser-4.9 |
4.9 | JDK 8+ |
The following example uses mybatis-plus-jsqlparser. For another JSqlParser version, replace the module name with the corresponding module from the table above.
Maven:
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
<version>Latest Version</version>
</dependency>
Gradle:
implementation 'com.baomidou:mybatis-plus-jsqlparser:Latest Version'
Extend the BaseMapper interface
public interface UserMapper extends BaseMapper<User> {
}
Use it
List<User> userList = userMapper.selectList(
new QueryWrapper<User>()
.lambda()
.ge(User::getAge, 18)
);
MyBatis-Plus will execute the following SQL:
SELECT * FROM user WHERE age >= 18
This showcase is just a small part of MyBatis-Plus features. If you want to learn more, please refer to the documentation.
License
MyBatis-Plus is under the Apache 2.0 license. See the Apache License 2.0 file for details.
Explorar proyectos relacionados
codecrafters-io/build-your-own-x
Domina la programación recreando desde cero tus tecnologías favoritas.
561,889 estrellaspublic-apis/public-apis
Una lista colectiva de API gratuitas
498,272 estrellasmorluto/rea
Ingeniería inversa de cualquier cosa con agentes, desde el comportamiento de la aplicación hasta los binarios nativos.
452,936 estrellasopenclaw/openclaw
La IA que de verdad hace las cosas. Cualquier sistema operativo y cualquier plataforma. Al estilo langosta. 🦞
394,367 estrellas