春风项目四线(合箱线、总装线)
yyt
2024-05-23 0ae327c0c3e6bf00e332f231c50a3bcbb0a7fb4c
提交 | 用户 | 时间
fd2207 1 # 数据源配置
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             # 主库数据源
f7a995 18 #            master:
Y 19 #                url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=Jcdm041-Mes
20 #                username: sa
21 #                password: JCDM@2023
127f1b 22             master:
Y 23                  url: jdbc:sqlserver://127.0.0.1:1433;DataBaseName=Jcdm041-Mes
0ae327 24                  username: sa
Y 25                  password: sam@123456
26 #            master:
27 #                 url: jdbc:sqlserver://127.0.0.1:1433;DataBaseName=Jcdm041-Mes
28 #                 username: dt
29 #                 password: dtroot
30 #            master:
31 #                 url: jdbc:sqlserver://192.168.6.238:1433;DataBaseName=Jcdm041-Mes
32 #                 username: dt
33 #                 password: dtroot
fd2207 34             # 从库数据源
a69d63 35 #            master:
Y 36 #                url: jdbc:sqlserver://183.134.244.158:1433;DataBaseName=Jcdm041-Mes
37 #                username: sa
38 #                password: JCDM@2023
fd2207 39             slave:
40                 # 从数据源开关/默认关闭
41                 enabled: false
42                 url:
43                 username:
44                 password:
45             # 初始连接数
46             initialSize: 5
47             # 最小连接池数量
48             minIdle: 10
49             # 最大连接池数量
50             maxActive: 20
51             # 配置获取连接等待超时的时间
52             maxWait: 60000
53             # 配置连接超时时间
54             connectTimeout: 30000
55             # 配置网络超时时间
56             socketTimeout: 60000
57             # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
58             timeBetweenEvictionRunsMillis: 60000
59             # 配置一个连接在池中最小生存的时间,单位是毫秒
60             minEvictableIdleTimeMillis: 300000
61             # 配置一个连接在池中最大生存的时间,单位是毫秒
62             maxEvictableIdleTimeMillis: 900000
63             # 配置检测连接是否有效
64 #            validationQuery: SELECT 1 FROM DUAL
65             validationQuery: SELECT 1
66             testWhileIdle: true
67             testOnBorrow: false
68             testOnReturn: false
69             webStatFilter:
70                 enabled: true
71             statViewServlet:
72                 enabled: true
73                 # 设置白名单,不填则允许所有访问
74                 allow:
75                 url-pattern: /druid/*
76                 # 控制台管理用户名和密码
77                 login-username: jcdm
78                 login-password: 123456
79             filter:
80                 stat:
81                     enabled: true
82                     # 慢SQL记录
83                     log-slow-sql: true
84                     slow-sql-millis: 1000
85                     merge-sql: true
86                 wall:
87                     config:
88                         multi-statement-allow: true