懒羊羊
2024-01-04 ac7391213ffee4036dadd18e13cc2e987475371d
提交 | 用户 | 时间
212300 1 # 数据源配置
2 spring:
3 #    datasource:
4 #        type: com.alibaba.druid.pool.DruidDataSource
5 #        driverClassName: com.mysql.cj.jdbc.Driver
6 #        druid:
7 #            # 主库数据源
8 #            master:
f38db3 9 #                url: jdbc:mysql://192.168.0.189:3306/jcdm-mes-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
212300 10 #                username: root
11 #                password: root
12     # 数据源配置
13     datasource:
14         type: com.alibaba.druid.pool.DruidDataSource
15         driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
16         druid:
17             # 主库数据源
18             master:
da2215 19                 url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=jcdm-mes
212300 20                 username: sa
464b0b 21                 password: JCDM@2023
212300 22             # 从库数据源
23             slave:
24                 # 从数据源开关/默认关闭
25                 enabled: false
f38db3 26                 url:
YY 27                 username:
28                 password:
212300 29             # 初始连接数
30             initialSize: 5
31             # 最小连接池数量
32             minIdle: 10
33             # 最大连接池数量
34             maxActive: 20
35             # 配置获取连接等待超时的时间
36             maxWait: 60000
37             # 配置连接超时时间
38             connectTimeout: 30000
39             # 配置网络超时时间
40             socketTimeout: 60000
41             # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
42             timeBetweenEvictionRunsMillis: 60000
43             # 配置一个连接在池中最小生存的时间,单位是毫秒
44             minEvictableIdleTimeMillis: 300000
45             # 配置一个连接在池中最大生存的时间,单位是毫秒
46             maxEvictableIdleTimeMillis: 900000
47             # 配置检测连接是否有效
48 #            validationQuery: SELECT 1 FROM DUAL
49             validationQuery: SELECT 1
50             testWhileIdle: true
51             testOnBorrow: false
52             testOnReturn: false
f38db3 53             webStatFilter:
212300 54                 enabled: true
55             statViewServlet:
56                 enabled: true
57                 # 设置白名单,不填则允许所有访问
58                 allow:
59                 url-pattern: /druid/*
60                 # 控制台管理用户名和密码
ac7391 61                 login-username: jcdm
212300 62                 login-password: 123456
63             filter:
64                 stat:
65                     enabled: true
66                     # 慢SQL记录
67                     log-slow-sql: true
68                     slow-sql-millis: 1000
69                     merge-sql: true
70                 wall:
71                     config:
72                         multi-statement-allow: true