diff --git a/blade-service/logpm-basicdata/src/main/resources/application-test.yml b/blade-service/logpm-basicdata/src/main/resources/application-test.yml index c4f22a92f..abb6e8a17 100644 --- a/blade-service/logpm-basicdata/src/main/resources/application-test.yml +++ b/blade-service/logpm-basicdata/src/main/resources/application-test.yml @@ -3,8 +3,43 @@ server: port: 8400 #数据源配置 +#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.basicdata.master.url} + username: ${blade.datasource.basicdata.master.username} + password: ${blade.datasource.basicdata.master.password} + slave: + druid: + #独立校验配置 + validation-query: select 1 + #oracle校验 + #validation-query: select 1 from dual + url: ${blade.datasource.basicdata.slave.url} + username: ${blade.datasource.basicdata.slave.username} + password: ${blade.datasource.basicdata.slave.password} +