Skip to content

Commit

Permalink
fix: update-readme, format configuration yaml (#593)
Browse files Browse the repository at this point in the history
I missed a level. :(

Co-authored-by: guop <[email protected]>
  • Loading branch information
alvinkwok1 and guop authored Nov 16, 2023
1 parent 93fe2cb commit 921d61a
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,38 +132,40 @@ spring:
spring:
datasource:
dynamic:
master_1:
master_2:
slave_1:
slave_2:
slave_3:
datasource:
master_1:
master_2:
slave_1:
slave_2:
slave_3:
```
**纯粹多库:**
```yaml
spring:
datasource:
dynamic:
mysql:
oracle:
sqlserver:
postgresql:
h2:
datasource:
mysql:
oracle:
sqlserver:
postgresql:
h2:
```
**混合配置:**
```yaml
spring:
datasource:
dynamic:
master:
slave_1:
slave_2:
oracle_1:
oracle_2:
datasource:
master:
slave_1:
slave_2:
oracle_1:
oracle_2:
```
3. 使用 **@DS** 切换数据源。
**@DS** 可以注解在方法上或类上,**同时存在就近原则 方法上注解 优先于 类上注解**。
Expand Down

0 comments on commit 921d61a

Please sign in to comment.