From ee72bb7434664b8c9c7972442e60b181597b1dac Mon Sep 17 00:00:00 2001 From: xuyuxiang Date: Mon, 12 Apr 2021 14:46:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=B8=8D=E5=90=8C=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=A1=88=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 36 +++++++++---------- .../src/main/resources/application-local.yml | 17 ++++++--- .../src/main/resources/application-prod.yml | 19 ++++++---- 3 files changed, 42 insertions(+), 30 deletions(-) diff --git a/xiaonuo-main/src/main/resources/application-dev.yml b/xiaonuo-main/src/main/resources/application-dev.yml index c1495909..670074b5 100644 --- a/xiaonuo-main/src/main/resources/application-dev.yml +++ b/xiaonuo-main/src/main/resources/application-dev.yml @@ -1,39 +1,37 @@ # Mysql数据库 -#spring: -# datasource: -# driver-class-name: com.mysql.cj.jdbc.Driver -# url: jdbc:mysql://localhost:3306/xiaonuo-vue?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true -# username: root -# password: 123456 -# # 连接池大小根据实际情况调整 -# max-active: 20 -# max-pool-prepared-statement-per-connection-size: 20 +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/xiaonuo-vue-pub?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true + username: root + password: 123456 + # 连接池大小根据实际情况调整 + max-active: 20 + max-pool-prepared-statement-per-connection-size: 20 # Oracle数据库 #spring: # datasource: # driver-class-name: oracle.jdbc.OracleDriver -# url: jdbc:oracle:thin:@localhost:1521:orcl +# url: jdbc:oracle:thin:@localhost:1521:xiaonuo-vue-pub-oracle # username: xiaonuo-vue-pub-oracle # password: 123456 -# # 连接池大小根据实际情况调整 -# max-active: 20 -# max-pool-prepared-statement-per-connection-size: 20 +# filters: wall,mergeStat # SQLServer配置 #spring: # datasource: # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver -# url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo -# username: sa -# password: wangdemo +# url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo-vue-pub-mssql +# username: xiaonuo-vue-pub-mssql +# password: 123456 # filters: wall,mergeStat #PostgreSQL配置 #spring: # datasource: # driverClassName: org.postgresql.Driver -# url: jdbc:postgresql://127.0.0.1:5432/xiaonuo -# username: postgres +# url: jdbc:postgresql://127.0.0.1:5432/xiaonuo-vue-pub-postgresql +# username: xiaonuo-vue-pub-postgresql # password: 123456 -# filters: wall,mergeStat +# filters: wall,mergeStat \ No newline at end of file diff --git a/xiaonuo-main/src/main/resources/application-local.yml b/xiaonuo-main/src/main/resources/application-local.yml index 46049762..670074b5 100644 --- a/xiaonuo-main/src/main/resources/application-local.yml +++ b/xiaonuo-main/src/main/resources/application-local.yml @@ -13,18 +13,25 @@ spring: #spring: # datasource: # driver-class-name: oracle.jdbc.OracleDriver -# url: jdbc:oracle:thin:@localhost:1521:orcl +# url: jdbc:oracle:thin:@localhost:1521:xiaonuo-vue-pub-oracle # username: xiaonuo-vue-pub-oracle # password: 123456 -# # 连接池大小根据实际情况调整 -# max-active: 20 -# max-pool-prepared-statement-per-connection-size: 20 +# filters: wall,mergeStat # SQLServer配置 #spring: # datasource: # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver # url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo-vue-pub-mssql -# username: sa +# username: xiaonuo-vue-pub-mssql # password: 123456 # filters: wall,mergeStat + +#PostgreSQL配置 +#spring: +# datasource: +# driverClassName: org.postgresql.Driver +# url: jdbc:postgresql://127.0.0.1:5432/xiaonuo-vue-pub-postgresql +# username: xiaonuo-vue-pub-postgresql +# password: 123456 +# filters: wall,mergeStat \ No newline at end of file diff --git a/xiaonuo-main/src/main/resources/application-prod.yml b/xiaonuo-main/src/main/resources/application-prod.yml index c70f7788..670074b5 100644 --- a/xiaonuo-main/src/main/resources/application-prod.yml +++ b/xiaonuo-main/src/main/resources/application-prod.yml @@ -2,7 +2,7 @@ spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/xiaonuo-vue?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true + url: jdbc:mysql://localhost:3306/xiaonuo-vue-pub?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true username: root password: 123456 # 连接池大小根据实际情况调整 @@ -13,18 +13,25 @@ spring: #spring: # datasource: # driver-class-name: oracle.jdbc.OracleDriver -# url: jdbc:oracle:thin:@localhost:1521:orcl +# url: jdbc:oracle:thin:@localhost:1521:xiaonuo-vue-pub-oracle # username: xiaonuo-vue-pub-oracle # password: 123456 -# # 连接池大小根据实际情况调整 -# max-active: 20 -# max-pool-prepared-statement-per-connection-size: 20 +# filters: wall,mergeStat # SQLServer配置 #spring: # datasource: # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver # url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo-vue-pub-mssql -# username: sa +# username: xiaonuo-vue-pub-mssql # password: 123456 # filters: wall,mergeStat + +#PostgreSQL配置 +#spring: +# datasource: +# driverClassName: org.postgresql.Driver +# url: jdbc:postgresql://127.0.0.1:5432/xiaonuo-vue-pub-postgresql +# username: xiaonuo-vue-pub-postgresql +# password: 123456 +# filters: wall,mergeStat \ No newline at end of file