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