update docs

This commit is contained in:
开源海哥 2023-06-25 14:44:45 +08:00
parent 5e94ec87b3
commit 63d0a7133e
2 changed files with 4 additions and 1 deletions

View File

@ -72,6 +72,9 @@ MyBatis-Flex 提供了 4 种方式来配置数据源:
- 3、`@UseDataSource("dataSourceName")` 在 Mapper 方法上,添加注解,用于指定使用哪个数据源。 - 3、`@UseDataSource("dataSourceName")` 在 Mapper 方法上,添加注解,用于指定使用哪个数据源。
- 4、`@Table(dataSource="dataSourceName")` 在 Entity 类上添加注解,该 Entity 的增删改查请求默认使用该数据源。 - 4、`@Table(dataSource="dataSourceName")` 在 Entity 类上添加注解,该 Entity 的增删改查请求默认使用该数据源。
> 在 SpringBoot 项目上,`@UseDataSource("dataSourceName")` 也可用于在 Controller 或者 Service 上。若是 Spring 项目(非 SpringBoot,
> 用户需要参考 `MultiDataSourceAutoConfiguration` 进行配置后才能使用。
`DataSourceKey.use` 示例: `DataSourceKey.use` 示例:
```java 2,6 ```java 2,6

View File

@ -9,7 +9,7 @@ MyBatis-Flex 使用了 APTAnnotation Processing Tool技术在项目编
## 配置文件和选项 ## 配置文件和选项
要对 MyBatis-Flex 的 APT 细节选项进行配置,你需要在项目的 **根目录** 下创建名为 `mybatis-flex.config` 的文件。 要对 MyBatis-Flex 的 APT 细节选项进行配置,你需要在项目的 **根目录** `pom.xml` 所在的目录)下创建名为 `mybatis-flex.config` 的文件。
支持的配置选项如下: 支持的配置选项如下: