From d97d9ec608862afc97143ed65331e50e0739a45f Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期四, 23 五月 2024 09:15:08 +0800 Subject: [PATCH] 多数据源 --- src/main/resources/config/application-dev.yml | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index c616905..48ca08c 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -18,12 +18,21 @@ #鏁版嵁搴� spring: datasource: - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.highgo.jdbc.Driver -# url: jdbc:dm://localhost:5236/SYSDBA?rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 - url: jdbc:highgo://192.168.10.183:5866/highgo?rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 - username: sysdba - password: Lmx&8688139 + dynamic: + primary: master # 榛樿浣跨敤mater搴� + strict: false # 涓嶄娇鐢ㄤ弗鏍兼ā寮� + datasource: + master: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.highgo.jdbc.Driver + # url: jdbc:dm://localhost:5236/SYSDBA?rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 + url: jdbc:highgo://192.168.10.183:5866/highgo?rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8 + username: sysdba + password: Lmx&8688139 + db2: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: org.sqlite.JDBC + url: jdbc:sqlite:E:\2杞欢涓嬭浇鍖匼easydarwin\EasyDarwin-windows-8.2.2-24031216\data\db\EasyDarwin.db?date_string_format=yyyy-MM-dd HH:mm:ss maxIdel: 60 initialPoolSize: 2 minPoolSize: 5 -- Gitblit v1.9.1