From 63d0a7133e4a785409431c81f794e9fd0b0d1f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=80=E6=BA=90=E6=B5=B7=E5=93=A5?= Date: Sun, 25 Jun 2023 14:44:45 +0800 Subject: [PATCH] update docs --- docs/zh/core/multi-datasource.md | 3 +++ docs/zh/others/apt.md | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/zh/core/multi-datasource.md b/docs/zh/core/multi-datasource.md index f3c0cf38..6a1845b3 100644 --- a/docs/zh/core/multi-datasource.md +++ b/docs/zh/core/multi-datasource.md @@ -72,6 +72,9 @@ MyBatis-Flex 提供了 4 种方式来配置数据源: - 3、`@UseDataSource("dataSourceName")` 在 Mapper 方法上,添加注解,用于指定使用哪个数据源。 - 4、`@Table(dataSource="dataSourceName")` 在 Entity 类上添加注解,该 Entity 的增删改查请求默认使用该数据源。 +> 在 SpringBoot 项目上,`@UseDataSource("dataSourceName")` 也可用于在 Controller 或者 Service 上。若是 Spring 项目(非 SpringBoot), +> 用户需要参考 `MultiDataSourceAutoConfiguration` 进行配置后才能使用。 + `DataSourceKey.use` 示例: ```java 2,6 diff --git a/docs/zh/others/apt.md b/docs/zh/others/apt.md index 60a08709..d92050a3 100644 --- a/docs/zh/others/apt.md +++ b/docs/zh/others/apt.md @@ -9,7 +9,7 @@ MyBatis-Flex 使用了 APT(Annotation Processing Tool)技术,在项目编 ## 配置文件和选项 -要对 MyBatis-Flex 的 APT 细节选项进行配置,你需要在项目的 **根目录** 下创建名为 `mybatis-flex.config` 的文件。 +要对 MyBatis-Flex 的 APT 细节选项进行配置,你需要在项目的 **根目录** ( `pom.xml` 所在的目录)下创建名为 `mybatis-flex.config` 的文件。 支持的配置选项如下: