doc: update docs

This commit is contained in:
michael 2024-01-09 18:15:27 +08:00
parent ff915cc5bb
commit 3a87fe04f8
3 changed files with 53 additions and 9 deletions

View File

@ -10,9 +10,9 @@ MyBatis-Flex 展示的机会。
在本站对应的位置放置您的 LOGO 及跳转链接。 在本站对应的位置放置您的 LOGO 及跳转链接。
| 位置 | 素材 | 宽高 | 赞助费 | 名额 | | 位置 | 素材 | 宽高 | 赞助费 | 名额 |
| ---------------- | ---------------- | ------------- | ---------- |------------ | | ---------------- | ---------------- |----------| ---------- |----|
| 全站右侧边栏 1 | 图片+链接 | 105*50px | ¥200/月 | 8 | | 全站右侧边栏 1 | 图片+链接 | 105*50px | ¥200/月 | 8 |
| 全站右侧边栏 2 | 图片+链接 | 122*50px | ¥400/月 |1 | | 全站右侧边栏 2 | 图片+链接 | 222*50px | ¥400/月 | 1 |
您可以联系微信 `fuh99888` 就展示位的详细事宜。 您可以联系微信 `fuh99888` 就展示位的详细事宜。

View File

@ -57,7 +57,6 @@ VALUES (1, '张三', 18, '2020-01-11'),
需要添加的 Maven 主要依赖示例: 需要添加的 Maven 主要依赖示例:
```xml ```xml
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.mybatis-flex</groupId> <groupId>com.mybatis-flex</groupId>
@ -82,6 +81,35 @@ VALUES (1, '张三', 18, '2020-01-11'),
</dependencies> </dependencies>
``` ```
**注意** 如果您当前使用的是 SpringBoot v3.x 版本,需要把依赖 `mybatis-flex-spring-boot-starter` 修改为:`mybatis-flex-spring-boot3-starter`,
如下代码所示:
```xml 4
<dependencies>
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-spring-boot3-starter</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<!-- for test only -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
```
**第 3 步:对 Spring Boot 项目进行配置** **第 3 步:对 Spring Boot 项目进行配置**
在 application.yml 中配置数据源: 在 application.yml 中配置数据源:

View File

@ -38,9 +38,9 @@
</dependency> </dependency>
`````` ``````
3、用到了 Spring Boot 的场景 3、用到了 SpringBoot v2.x 的场景
```xml ```xml 3
<dependency> <dependency>
<groupId>com.mybatis-flex</groupId> <groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-spring-boot-starter</artifactId> <artifactId>mybatis-flex-spring-boot-starter</artifactId>
@ -54,7 +54,23 @@
</dependency> </dependency>
``` ```
4、配置 annotationProcessor 4、用到了 SpringBoot v3.x 的场景
```xml 3
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-spring-boot3-starter</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>com.mybatis-flex</groupId>
<artifactId>mybatis-flex-processor</artifactId>
<version>1.7.7</version>
<scope>provided</scope>
</dependency>
```
5、配置 annotationProcessor
`mybatis-flex-processor`提供APT服务可以配置到annotationProcessorPaths配置后无需在依赖中声明`mybatis-flex-processor`依赖。 `mybatis-flex-processor`提供APT服务可以配置到annotationProcessorPaths配置后无需在依赖中声明`mybatis-flex-processor`依赖。
@ -79,7 +95,7 @@
</plugin> </plugin>
``` ```
5、配置依赖管理 6、配置依赖管理
MyBatis-Flex 提供了 `mybatis-flex-dependencies` 模块进行依赖管理,只需要在 `<dependencyManagement>` 标签下进行配置就可以了。 MyBatis-Flex 提供了 `mybatis-flex-dependencies` 模块进行依赖管理,只需要在 `<dependencyManagement>` 标签下进行配置就可以了。