Skip to content

Installation

The brand new MyBatis-Plus 3.0 version is built on JDK8 and provides lambda-style calls, so the requirements for installing and integrating MP 3.0 are as follows:

  • JDK 8+
  • Maven or Gradle

Release

Spring Boot2

<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.14</version>
</dependency>

Spring Boot3

<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
<version>3.5.14</version>
</dependency>

Spring Boot4 (Starting from 3.5.13)

<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot4-starter</artifactId>
<version>3.5.14</version>
</dependency>

Spring

<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>3.5.14</version>
</dependency>

Solon

<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-solon-plugin</artifactId>
<version>3.5.12</version>
</dependency>

Snapshot

Snapshot SNAPSHOT versions require adding the repository, and the version number is the snapshot version. Click here to view the latest snapshot version number.

Maven:

<repository>
<id>snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</repository>

If you cannot download snapshots when using a proxy repository, please add !snapshots to mirrorOf.

<mirror>
<id>aliyunmaven</id>
<mirrorOf>*,!snapshots</mirrorOf>
<name>Aliyun Public Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>

Gradle:

repositories {
maven { url 'https://central.sonatype.com/repository/maven-snapshots/' }
}

Maven bom

Use maven bom to manage dependencies and reduce version conflicts. Because jsqlparser 5.0+ versions no longer support jdk8, the jsqlparser dependency has been decoupled to address this issue. The correct approach is to introduce the mybatis-plus-bom module, then introduce the ..starter and ..jsqlparser.. dependencies.

mybatis-plus-jsqlparser: This dependency will be updated following the latest jsqlparser version support.

mybatis-plus-jsqlparser-xx: These are specific jsqlparser versions for particular support, i.e., versions that cannot be compatibly updated.

  • Maven
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-bom</artifactId>
<version>3.5.9+ version</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- spring boot3 optional module -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
</dependency>
<!-- jdk 11+ optional module -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>
<!-- spring boot2 optional module -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- jdk 8+ optional module -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser-4.9</artifactId>
</dependency>
  • Gradle
// Dependency management
dependencyManagement {
imports {
mavenBom "com.baomidou:mybatis-plus-bom:3.5.9+ version"
}
}
// spring boot3 optional module
implementation("com.baomidou:mybatis-plus-spring-boot3-starter")
// jdk 11+ optional module
implementation("com.baomidou:mybatis-plus-jsqlparser")
// spring boot2 optional module
implementation("com.baomidou:mybatis-plus-boot-starter")
// jdk 8+ optional module
implementation("com.baomidou:mybatis-plus-jsqlparser-4.9")
Baomidou

© 2016-2025 Baomidou™. All Rights Reserved.

Power by Astro Starlight | Sponsored by JetBrains

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