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