春风项目四线(合箱线、总装线)
hdy
2024-01-23 db8f36b1d3f659ddb91ade9db990f87c2f1759f2
提交 | 用户 | 时间
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             # 主库数据源
18             master:
bce8df 19                 url: jdbc:sqlserver://192.168.0.189:1433;DataBaseName=Jcdm041-Mes
fd2207 20                 username: sa
21                 password: JCDM@2023
22             # 从库数据源
23             slave:
24                 # 从数据源开关/默认关闭
25                 enabled: false
26                 url:
27                 username:
28                 password:
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
53             webStatFilter:
54                 enabled: true
55             statViewServlet:
56                 enabled: true
57                 # 设置白名单,不填则允许所有访问
58                 allow:
59                 url-pattern: /druid/*
60                 # 控制台管理用户名和密码
61                 login-username: jcdm
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