【更新】更新不同数据库配置案例

This commit is contained in:
xuyuxiang 2021-04-12 14:46:51 +08:00
parent 456e169ec9
commit ee72bb7434
3 changed files with 42 additions and 30 deletions

View File

@ -1,39 +1,37 @@
# Mysql数据库 # Mysql数据库
#spring: spring:
# datasource: datasource:
# driver-class-name: com.mysql.cj.jdbc.Driver 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 username: root
# password: 123456 password: 123456
# # 连接池大小根据实际情况调整 # 连接池大小根据实际情况调整
# max-active: 20 max-active: 20
# max-pool-prepared-statement-per-connection-size: 20 max-pool-prepared-statement-per-connection-size: 20
# Oracle数据库 # Oracle数据库
#spring: #spring:
# datasource: # datasource:
# driver-class-name: oracle.jdbc.OracleDriver # 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 # username: xiaonuo-vue-pub-oracle
# password: 123456 # password: 123456
# # 连接池大小根据实际情况调整 # filters: wall,mergeStat
# max-active: 20
# max-pool-prepared-statement-per-connection-size: 20
# SQLServer配置 # SQLServer配置
#spring: #spring:
# datasource: # datasource:
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo # url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo-vue-pub-mssql
# username: sa # username: xiaonuo-vue-pub-mssql
# password: wangdemo # password: 123456
# filters: wall,mergeStat # filters: wall,mergeStat
#PostgreSQL配置 #PostgreSQL配置
#spring: #spring:
# datasource: # datasource:
# driverClassName: org.postgresql.Driver # driverClassName: org.postgresql.Driver
# url: jdbc:postgresql://127.0.0.1:5432/xiaonuo # url: jdbc:postgresql://127.0.0.1:5432/xiaonuo-vue-pub-postgresql
# username: postgres # username: xiaonuo-vue-pub-postgresql
# password: 123456 # password: 123456
# filters: wall,mergeStat # filters: wall,mergeStat

View File

@ -13,18 +13,25 @@ spring:
#spring: #spring:
# datasource: # datasource:
# driver-class-name: oracle.jdbc.OracleDriver # 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 # username: xiaonuo-vue-pub-oracle
# password: 123456 # password: 123456
# # 连接池大小根据实际情况调整 # filters: wall,mergeStat
# max-active: 20
# max-pool-prepared-statement-per-connection-size: 20
# SQLServer配置 # SQLServer配置
#spring: #spring:
# datasource: # datasource:
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo-vue-pub-mssql # 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 # password: 123456
# filters: wall,mergeStat # filters: wall,mergeStat

View File

@ -2,7 +2,7 @@
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver 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 username: root
password: 123456 password: 123456
# 连接池大小根据实际情况调整 # 连接池大小根据实际情况调整
@ -13,18 +13,25 @@ spring:
#spring: #spring:
# datasource: # datasource:
# driver-class-name: oracle.jdbc.OracleDriver # 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 # username: xiaonuo-vue-pub-oracle
# password: 123456 # password: 123456
# # 连接池大小根据实际情况调整 # filters: wall,mergeStat
# max-active: 20
# max-pool-prepared-statement-per-connection-size: 20
# SQLServer配置 # SQLServer配置
#spring: #spring:
# datasource: # datasource:
# driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
# url: jdbc:sqlserver://localhost:1433;DatabaseName=xiaonuo-vue-pub-mssql # 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 # password: 123456
# filters: wall,mergeStat # filters: wall,mergeStat