Skip to content

Commit

Permalink
新增 3.5.9+ 版本引入说明
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Oct 24, 2024
1 parent 779477f commit 258c7f0
Showing 1 changed file with 72 additions and 1 deletion.
73 changes: 72 additions & 1 deletion src/content/docs/getting-started/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import LastedDependency from '@/components/LastedDependency.astro';
- JDK 8+
- Maven or Gradle

> 版本 `3.5.8+` 最低要求 `JDK 11+`
:::caution[注意事项]
版本 `3.5.9+` 开始修改为可选依赖,具体查看下文 `maven bom` 部分。
:::

## Release

Expand Down Expand Up @@ -68,3 +70,72 @@ repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
```

## Maven bom

> 使用 `maven bom` 管理依赖,减少版本号的冲突。因为 `jsqlparser 5.0+` 版本不再支持 `jdk8` 针对这个问题解耦 `jsqlparser` 依赖。
正确打开姿势,引入 `mybatis-plus-bom` 模块,然后引入 `..starter``..jsqlparser..` 依赖

- Maven

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-bom</artifactId>
<version>3.5.9+ 版本</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<!-- spring boot3 引入可选模块 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
</dependency>

<!-- jdk 11+ 引入可选模块 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser</artifactId>
</dependency>

<!-- spring boot2 引入可选模块 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>

<!-- jdk 8+ 引入可选模块 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser-4.9</artifactId>
</dependency>
```


- Gradle

```groovy
// 依赖管理
dependencyManagement {
imports {
mavenBom "com.baomidou:mybatis-plus-bom:3.5.9+ 版本"
}
}
// spring boot3 引入可选模块
implementation("com.baomidou:mybatis-plus-spring-boot3-starter")
// jdk 11+ 引入可选模块
implementation("com.baomidou:mybatis-plus-jsqlparser")
// spring boot2 引入可选模块
implementation("com.baomidou:mybatis-plus-boot-starter")
// jdk 8+ 引入可选模块
implementation("com.baomidou:mybatis-plus-jsqlparser-4.9")
```

0 comments on commit 258c7f0

Please sign in to comment.