!309 doc: 添加 mybatis-flex-dependencies 使用说明。

Merge pull request !309 from 王帅/main
This commit is contained in:
Michael Yang 2023-08-24 13:10:29 +00:00 committed by Gitee
commit 769162077d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -54,7 +54,7 @@
</dependency>
```
4. 配置 annotationProcessor
4配置 annotationProcessor
`mybatis-flex-processor`提供APT服务可以配置到annotationProcessorPaths配置后无需在依赖中声明`mybatis-flex-processor`依赖。
@ -78,3 +78,36 @@
</configuration>
</plugin>
```
5、配置依赖管理
MyBatis-Flex 提供了 `mybatis-flex-dependencies` 模块进行依赖管理,只需要在 `<dependencyManagement>` 标签下进行配置就可以了。
```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.mybatisflex</groupId>
<artifactId>mybatis-flex-dependencies</artifactId>
<version>${mybatis-flex.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```
在使用时就可以不指定 `<version>` 标签了,例如:
```xml
<dependencies>
<dependency>
<groupId>com.mybatisflex</groupId>
<artifactId>mybatis-flex-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.mybatisflex</groupId>
<artifactId>mybatis-flex-codegen</artifactId>
</dependency>
</dependencies>
```