update 优化 适配框架多数据库支持 完成 oracle postgres 数据库适配

(放弃 sqlserver 适配 原因: 基础中间件均不支持)
This commit is contained in:
疯狂的狮子li
2022-12-27 16:17:16 +08:00
parent db5d448623
commit 77e899981a
10 changed files with 136 additions and 69 deletions

View File

@@ -13,6 +13,14 @@ datasource:
url: jdbc:mysql://localhost:3306/ry-job?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
username: root
password: password
# system-oracle:
# url: jdbc:oracle:thin:@//localhost:1521/XE
# username: ROOT
# password: password
# system-postgres:
# url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
# username: root
# password: password
spring:
datasource:

View File

@@ -11,14 +11,20 @@ spring:
url: ${datasource.system-master.url}
username: ${datasource.system-master.username}
password: ${datasource.system-master.password}
# 从库数据源
#slave:
# lazy: true
# type: ${spring.datasource.type}
# driver-class-name:
# url:
# username:
# password:
# oracle:
# type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver
# url: ${datasource.system-oracle.url}
# username: ${datasource.system-oracle.username}
# password: ${datasource.system-oracle.password}
# hikari:
# connectionTestQuery: SELECT 1 FROM DUAL
# postgres:
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# url: ${datasource.system-postgres.url}
# username: ${datasource.system-postgres.url}
# password: ${datasource.system-postgres.url}
# 代码生成
gen:

View File

@@ -11,6 +11,20 @@ spring:
url: ${datasource.system-master.url}
username: ${datasource.system-master.username}
password: ${datasource.system-master.password}
# oracle:
# type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver
# url: ${datasource.system-oracle.url}
# username: ${datasource.system-oracle.username}
# password: ${datasource.system-oracle.password}
# hikari:
# connectionTestQuery: SELECT 1 FROM DUAL
# postgres:
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# url: ${datasource.system-postgres.url}
# username: ${datasource.system-postgres.url}
# password: ${datasource.system-postgres.url}
mail:
enabled: false

View File

@@ -11,10 +11,17 @@ spring:
url: ${datasource.system-master.url}
username: ${datasource.system-master.username}
password: ${datasource.system-master.password}
# 从库数据源
# slave:
# type: ${spring.datasource.type}
# driver-class-name:
# url:
# username:
# password:
# oracle:
# type: ${spring.datasource.type}
# driverClassName: oracle.jdbc.OracleDriver
# url: ${datasource.system-oracle.url}
# username: ${datasource.system-oracle.username}
# password: ${datasource.system-oracle.password}
# hikari:
# connectionTestQuery: SELECT 1 FROM DUAL
# postgres:
# type: ${spring.datasource.type}
# driverClassName: org.postgresql.Driver
# url: ${datasource.system-postgres.url}
# username: ${datasource.system-postgres.url}
# password: ${datasource.system-postgres.url}