From 201b6dcb0ccdf67c6d42d923212ce692f8753d73 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Wed, 31 May 2023 11:46:33 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9based=20test=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-test.yml | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/blade-service/logpm-basic/src/main/resources/application-test.yml b/blade-service/logpm-basic/src/main/resources/application-test.yml index 2e131d6b3..3ff547cac 100644 --- a/blade-service/logpm-basic/src/main/resources/application-test.yml +++ b/blade-service/logpm-basic/src/main/resources/application-test.yml @@ -3,8 +3,43 @@ server: port: 8300 #数据源配置 +#spring: +# datasource: +# url: ${blade.datasource.dev.url} +# username: ${blade.datasource.dev.username} +# password: ${blade.datasource.dev.password} + spring: + #排除DruidDataSourceAutoConfigure + autoconfigure: + exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure datasource: - url: ${blade.datasource.test.url} - username: ${blade.datasource.test.username} - password: ${blade.datasource.test.password} + dynamic: + druid: + #通用校验配置 + validation-query: select 1 + #启用sql日志拦截器 + proxy-filters: + - sqlLogInterceptor + #设置默认的数据源或者数据源组,默认值即为master + primary: master + datasource: + master: + druid: + #独立校验配置 + validation-query: select 1 + #oracle校验 + #validation-query: select 1 from dual + url: ${blade.datasource.basic.master.url} + username: ${blade.datasource.basic.master.username} + password: ${blade.datasource.basic.master.password} + slave: + druid: + #独立校验配置 + validation-query: select 1 + #oracle校验 + #validation-query: select 1 from dual + url: ${blade.datasource.basic.slave.url} + username: ${blade.datasource.basic.slave.username} + password: ${blade.datasource.basic.slave.password} +