From 921d61ab755bfb871a2f6083003705ca62e8043c Mon Sep 17 00:00:00 2001 From: Alvin Kwok <1305167657@qq.com> Date: Thu, 16 Nov 2023 20:19:44 +0800 Subject: [PATCH] fix: update-readme, format configuration yaml (#593) I missed a level. :( Co-authored-by: guop --- README.md | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 965eb3c0..e0391e05 100644 --- a/README.md +++ b/README.md @@ -132,11 +132,12 @@ 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: ``` **纯粹多库:** @@ -144,11 +145,12 @@ spring: spring: datasource: dynamic: - mysql: - oracle: - sqlserver: - postgresql: - h2: + datasource: + mysql: + oracle: + sqlserver: + postgresql: + h2: ``` **混合配置:** @@ -156,14 +158,14 @@ spring: 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** 可以注解在方法上或类上,**同时存在就近原则 方法上注解 优先于 类上注解**。