From 141c78e904f7579b197f79fad7047c11b5181d19 Mon Sep 17 00:00:00 2001 From: smallchill Date: Sat, 21 Aug 2021 15:45:56 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E5=A2=9E=E5=8A=A0=E5=A4=9A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E6=A0=A1=E9=AA=8C=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/blade-service/blade-demo/src/main/resources/application-dev.yml b/blade-service/blade-demo/src/main/resources/application-dev.yml index 144671739..9a5bf082a 100644 --- a/blade-service/blade-demo/src/main/resources/application-dev.yml +++ b/blade-service/blade-demo/src/main/resources/application-dev.yml @@ -16,16 +16,29 @@ spring: datasource: 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.demo.master.url} username: ${blade.datasource.demo.master.username} password: ${blade.datasource.demo.master.password} slave: + druid: + #独立校验配置 + validation-query: select 1 + #oracle校验 + #validation-query: select 1 from dual url: ${blade.datasource.demo.slave.url} username: ${blade.datasource.demo.slave.username} password: ${blade.datasource.demo.slave.password}