MES yaml 配置
注意
修改数据库相关配置信息
# *******************************************************************************
# ********** 修改jhyw.description模块名称 ***************************************
# ********** 修改server.port端口号 **********************************************
# ********** 修改spring.datasource.druid.url数据库连接参数 **********************
# ********** 修改数据库类型dbType,则修改mybatis-plus.mapper-locations **********
# *******************************************************************************
#项目相关配置
jhyw:
name: imes
version: 7.0.1
copyrightYear: 2022
description: 生产管理模块
#配置端口
server:
port: 8083
max-http-header-size: 102400
spring:
profiles:
active: dev
#开启SpringBoot Admin的客户端
#boot:
#admin:
#server:
#url: http://192.168.1.204:3000
#client:
#开启客户端:默认值true
#enabled: false
#消费者@EnableFeignClients
application:
name: mes
cloud:
nacos:
#注册中心
discovery:
server-addr: 127.0.0.1:8848
heart-beat-interval: 5000
heart-beat-timeout: 15000
#外部tomcat或中间件配置的server端口号
#container-port: 8080
#配置中心
config:
server-addr: 127.0.0.1:8848
file-extension: yaml
group: DEFAULT_GROUP
main:
#bean重复
allow-bean-definition-overriding: true
servlet:
multipart:
max-file-size: -1 #10MB
max-request-size: -1 #100MB
#文件上传位置:默认值d:/
upload-redis: true
#配置数据源的属性
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: oracle.jdbc.OracleDriver
driverClassName: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@210.12.53.106:1522:orcl
username: user?
password: pwd?
dbType: oracle
# datasource:
# type: com.alibaba.druid.pool.DruidDataSource
# druid:
# driver-class-name: oracle.jdbc.OracleDriver
# driverClassName: oracle.jdbc.OracleDriver
# url: jdbc:oracle:thin:@192.168.1.7:1521:orcl
# username: user?
# password: user?
# dbType: oracle
max-active: 100
max-wait: 5000
initial-size: 1
filters: stat,slf4j #,wall
#验证连接
validationQuery: select 'x' FROM DUAL
enable: true
#监控配置
stat-view-servlet:
enabled: true
login-username: root
login-password: root
allow:
deny:
url-pattern: /druid/*
test-while-idle: true
test-on-borrow: true
#test-on-return: true
devtools:
#是否支持livereload
#livereload:
#enabled : true
#port: 35729
restart:
#禁用热部署的自动重启服务:默认值true,开发环境设置为false,生产环境设置为true
#enabled: false
#修改后不需要重启项,TODO测试不成功
exclude: static/**,templates/**,vm/**
#修改后需要重启项
additional-paths: src/main/java,src/main/resource
#thymeleaf的配置
thymeleaf:
enabled: true
cache: false
#web-stat-filter:
#enabled: true
#exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
jackson:
date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8
#serialization:
#write-dates-as-timestamps: true
#deserialization:
#accept_empty_string_as_null_object: true
#允许对象忽略json中不存在的属性
#fail_on_unknown_properties: false
mvc:
date-format: yyyy-MM-dd HH:mm:ss
view:
prefix: classpath:/templates/
suffix: .html
static-path-pattern: /**
resources:
static-locations: classpath:/resources/,classpath:/static/,classpath:/templates/,classpath:/public/
messages:
# 国际化资源文件路径,包括messages_en_US、messages_zh_CN
basename: i18n/messages
# redis 配置
redis:
# 地址
host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 密码
#password: 123456
# 连接超时时间:毫秒,默认值2000
timeout: 10000
# 默认数据库
#database: 0
# 连接池配置,Springboot2.0中直接使用jedis或者lettuce配置连接池
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 最大活跃连接数,负数为不限制
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
# 配置mybatisplus
mybatis-plus:
mapper-locations:
# oracle配置文件路径
- classpath:mapper/oracle/*/*.xml
- classpath*:**/mapper/core/oracle/*.xml
- classpath:mapper/oracle/*/*/*.xml
# mysql配置文件路径
#- classpath:mapper/*.xml
#- classpath*:**/mapper/mysql/*.xml
global-config:
db-config:
id-type: auto
banner: true
configuration:
jdbc-type-for-null: 'null'
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
#以下2项是驼峰配置,需要ObjectWrapperFactoryConverter转换类配合
map-underscore-to-camel-case: true
#object-wrapper-factory: com.baomidou.mybatisplus.extension.MybatisMapWrapperFactory
#shiro的配置
shiro:
#加密方式
hash-algorithm-name: md5
#散列次数
hash-iterations: 2
#禁止记录登出日志:默认值false,开发环境下可以配置成true
#prevent-log4-logout: true
#session超时:毫秒,默认值30分钟,负数为永远不失效
session-timeout: 1800000
#是否开启定时调度器进行检测过期session:默认值false(多并发登录测试,不踢人,不回写登录状态,不记日志),生产环境设置为true
session-validation-enabled: true
#定时检测session过期:毫秒,默认值1小时
validation-interval: 3600000
#记住我cookie生效时间(应小于session-timeout的值):单位秒
#remember-me-seconds: 1800
#记住我(与max-session互斥):默认值false,开发环境下可以配置成true
rememberMe: true
#同一用户最大会话数(与rememberMe互斥):默认值0(不限制),正式环境下可以配置成1,如果session-validation-enabled设置为false,则跟此值设置成0等同
max-session: 1
#立即踢人:默认值false,前端弹出提示,如果为true,只标记session并不真正踢
immediate-kickout: true
#服务器启动时,是否将所有在线用户置为离线,默认值false
#offline-users-onstartup: false
#服务器启动时,是否清空所有缓存,默认值false,开发环境下可以配置成true
#remove-cache-onstartup: true
##是否启用redis缓存:默认值true
##use-redis-cache: false
##redis缓存数据库:默认值5
##redis-database: 5
#session失效后重定向
login-url: /index.html
#被踢出后重定向
kickout-url: /index.html
#放行的路径
anon-urls:
- /index.html*
- /resources/**
#监听登出
logout-url: /login/logout*
#自动登录
auto-login-urls:
- /workflow/toDoTask/**
- /workflow/toBillList/**
- /workflow/toWorkFlowModel/**
- /workflow/toViewSPQuery/**
#拦截的路径
authc-urls:
- /**
#yml文件加密
jasypt:
encryptor:
#解决application.yml与application-{profile}.yml失效的问题
bootstrap: false
#加密方式
#algorithm: PBEWITHHMACSHA512ANDAES_256
property:
prefix: MES7(
minio:
#启用:默认值false
enabled: true
endpoint: http://192.168.1.7:9000
accessKey: MES7(646B35A5912D1F1BC68038616E07A16825DD2D810ADA2B94)
secretKey: MES7(045655F8BF941FEC9C7EE0F50BC9BF7FFE01B232AEA17090)
bucketName: mes7
#app 全局唯一id生成
app:
idGenerator:
workerId: 1
datacenterId: 0
#swagger3相关配置,访问地址:/swagger-ui/index.html
springfox:
documentation:
swagger-ui:
#开发环境设置成true
enabled: true
open-api:
v3:
path: /swagger/v3/api-docs
#扫描包名
base-packages: com.ms
#排除包名
negate-packages: com.ms.test
#能力增强,访问地址:/doc.html
knife4j:
# 开启生产环境(可以作为启用knife4j的权限开关,结合以下Basic认证),开发环境设置成false(否则无权限打开doc.html),或开启以下Basic认证
production: false
basic:
# 开启Basic认证功能,默认是false,开发环境设置成true,或将以上生产环境production设置成false
enable: false
# Basic认证用户名
username: test
# Basic认证密码
password: 123
# 开启增强配置(即控制以下setting,注意非enabled),不是启用knife4j的权限开关(即区别于production控制参数)
enable: true
setting:
# 启用doc.html里的调试功能,开发环境设置成true,前题必须开启以上增强配置enable
enableDebug: true
#消费者
feign:
hystrix:
#callback是否生效
enabled: true
#开启压缩数据
compression:
request:
# 可以被压缩的类型
mime-types:
- text/xml
- application/xml
- application/json
# 超过2048个字节进行压缩
min-request-size: 2048
response:
enabled: true
client:
config:
default:
connect-timeout: 10000
read-timeout: 600000
remoteAlgorithm:
connect-timeout: 10000
read-timeout: 600000
#hystrix的超时时间
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
thread:
#设置请求超时时间,默认1秒,超过指定的时间后,触发服务熔断
timeoutInMilliseconds: 10000
#配置监测点actuator
management:
security:
enabled: false
health:
defaults:
enabled: false
#redis:
#enabled: true
endpoint:
health:
#show-details: always
show-details: never
metrics:
enabled: true
prometheus:
enabled: true
endpoints:
# 关闭监测
enabled-by-default: false
web:
exposure:
#include: '*'
#include: refresh,health,info
#include: refresh
include: '*'
metrics:
export:
prometheus:
enabled: true
# 日志配置
logging:
level:
#root: DEBUG
com.ms: DEBUG
com.ms.config.websocket: ERROR
file:
path: c:/logs
# logback日志切割
config: classpath:logback-spring.xml
#定时消息配置
quartz:
#启用调度:默认值false
enabled: false
#websocket
websocket:
#启用:默认值false
enabled: false
#缓存
cache:
#启用redis缓存:默认值true
#use-redis-cache: false
#redis缓存数据库:默认值6
#redis-database: 6
#是否启用159工作流
eqmIsWorkFlow: false
qualityProblemUrl: 123
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384