数据源配置

main
dongdingding 1 year ago
parent d9817feb9d
commit af8b6bd3f1

@ -4,18 +4,30 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
# 主库数据源 远程服务服务器
master:
url: jdbc:mysql://20.1.0.158:3306/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root
password: root
#公司远程
# url: jdbc:mysql://39.101.188.84:3307/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: Admin123@
##公司本地
# url: jdbc:mysql://localhost:3307/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: Admin123@
#本地
# url: jdbc:mysql://localhost:3306/tc_zz?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: adminadmin
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量

Loading…
Cancel
Save