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