From fa732b0a5a9f7ff4475ee1713ab4d723da657db9 Mon Sep 17 00:00:00 2001 From: 16639036659 <577530412@qq.com> Date: 星期二, 01 十一月 2022 13:35:02 +0800 Subject: [PATCH] 添加配置文件,数据库5.8 --- src/main/resources/application-uat8.yml | 71 +++++++++++++++++++++++++++++++++++ src/main/resources/application.yml | 3 + 2 files changed, 73 insertions(+), 1 deletions(-) diff --git a/src/main/resources/application-uat8.yml b/src/main/resources/application-uat8.yml new file mode 100644 index 0000000..faf779d --- /dev/null +++ b/src/main/resources/application-uat8.yml @@ -0,0 +1,71 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + # 主库数据源 + master: +# driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://121.239.169.27:49031/safeplatform.luoan.uat?allowMultiQueries=true&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=UTC&zeroDateTimeBehavior=CONVERT_TO_NULL&serverTimezone=Asia/Shanghai + username: gkhy_safeplatform_guotai + password: user@GJLSJ828 + +# url: jdbc:mysql://localhost:3306/trouble_and_risk.guotai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: root +# password: root + +# url: jdbc:mysql://localhost:17716/trouble_and_risk?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: trouble_and_risk +# password: Bw44sxzyiE8SdWzJ + +# url: jdbc:mysql://192.168.10.201:3306/trouble_and_risk?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# username: trouble_and_risk +# password: LYGstJAYc85jkF7H + + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: + login-password: + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 8ec8aca..97ea2d5 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -69,7 +69,8 @@ date-format: yyyy-MM-dd HH:mm:ss profiles: # active: druid - active: uat +# active: uat + active: uat8 # 文件上传 servlet: multipart: -- Gitblit v1.9.2