2023-06-15 10:20:50 +08:00
|
|
|
|
spring:
|
2023-12-25 15:31:11 +08:00
|
|
|
|
dynamic:
|
|
|
|
|
|
tp:
|
|
|
|
|
|
enabled: true # 是否启用 dynamictp,默认true
|
|
|
|
|
|
enabledCollect: true # 是否开启监控指标采集,默认true
|
|
|
|
|
|
collectorTypes: logging,test_collect # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
|
|
|
|
|
logPath: C:\log\lms # 监控日志数据路径,默认 ${user.home}/logs,采集类型非logging不用配置
|
|
|
|
|
|
monitorInterval: 5
|
|
|
|
|
|
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
|
|
|
|
|
|
- threadPoolName: el-thread
|
|
|
|
|
|
threadPoolAliasName: 测试线程池 # 线程池别名
|
|
|
|
|
|
executorType: common # 线程池类型 common、eager、ordered、scheduled,默认 common
|
|
|
|
|
|
corePoolSize: 6 # 核心线程数,默认1
|
|
|
|
|
|
maximumPoolSize: 8 # 最大线程数,默认cpu核数
|
|
|
|
|
|
queueCapacity: 2000 # 队列容量,默认1024
|
|
|
|
|
|
queueType: VariableLinkedBlockingQueue # 任务队列,查看源码QueueTypeEnum枚举类,默认VariableLinkedBlockingQueue
|
|
|
|
|
|
rejectedHandlerType: CallerRunsPolicy # 拒绝策略,查看RejectedTypeEnum枚举类,默认AbortPolicy
|
|
|
|
|
|
keepAliveTime: 60 # 空闲线程等待超时时间,默认60
|
|
|
|
|
|
threadNamePrefix: el-pool # 线程名前缀,默认dtp
|
|
|
|
|
|
allowCoreThreadTimeOut: false # 是否允许核心线程池超时,默认false
|
|
|
|
|
|
waitForTasksToCompleteOnShutdown: true # 参考spring线程池设计,优雅关闭线程池,默认false
|
|
|
|
|
|
awaitTerminationSeconds: 5 # 优雅关闭线程池时,阻塞等待线程池中任务执行时间,默认0,单位(s)
|
|
|
|
|
|
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
|
|
|
|
|
runTimeout: 200 # 任务执行超时阈值,目前只做告警用,单位(ms),默认0
|
|
|
|
|
|
queueTimeout: 100 # 任务在队列等待超时阈值,目前只做告警用,单位(ms),默认0
|
|
|
|
|
|
taskWrapperNames: [ "ttl", "mdc" ] # 任务包装器名称,继承TaskWrapper接口
|
|
|
|
|
|
notifyEnabled: true # 是否开启报警,默认true
|
|
|
|
|
|
notifyItems: # 报警项,不配置自动会按默认值配置(变更通知、容量报警、活性报警、拒绝报警、任务超时报警)
|
|
|
|
|
|
- type: change
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
- type: capacity # 队列容量使用率,报警项类型,查看源码 NotifyTypeEnum枚举类
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 80 # 报警阈值,默认70,意思是队列使用率达到70%告警
|
|
|
|
|
|
interval: 120 # 报警间隔(单位:s),默认120
|
|
|
|
|
|
- type: liveness # 线程池活性
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 80 # 报警阈值,默认 70,意思是活性达到70%告警
|
|
|
|
|
|
- type: reject # 触发任务拒绝告警
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 100 # 默认阈值10
|
|
|
|
|
|
- type: run_timeout # 任务执行超时告警
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 100 # 默认阈值10
|
|
|
|
|
|
- type: queue_timeout # 任务排队超时告警
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 100 # 默认阈值10
|
|
|
|
|
|
tomcat-tp:
|
|
|
|
|
|
threadPoolName: tomcatTp
|
|
|
|
|
|
threadPoolAliasName: tomcat 线程池 # 线程池别名,可选
|
|
|
|
|
|
corePoolSize: 100
|
|
|
|
|
|
maximumPoolSize: 200
|
|
|
|
|
|
keepAliveTime: 60
|
|
|
|
|
|
runTimeout: 200
|
|
|
|
|
|
queueTimeout: 100
|
|
|
|
|
|
notifyItems: # 报警项,不配置自动会按默认值配置(变更通知、容量报警、活性报警、拒绝报警、任务超时报警)
|
|
|
|
|
|
- type: change
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
|
|
|
|
|
|
- type: capacity # 队列容量使用率,报警项类型,查看源码 NotifyTypeEnum枚举类
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 80 # 报警阈值,默认70,意思是队列使用率达到70%告警
|
|
|
|
|
|
interval: 120 # 报警间隔(单位:s),默认120
|
|
|
|
|
|
|
|
|
|
|
|
- type: liveness # 线程池活性
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 80 # 报警阈值,默认 70,意思是活性达到70%告警
|
|
|
|
|
|
|
|
|
|
|
|
- type: reject # 触发任务拒绝告警
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 100 # 默认阈值10
|
|
|
|
|
|
|
|
|
|
|
|
- type: run_timeout # 任务执行超时告警
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 100 # 默认阈值10
|
|
|
|
|
|
|
|
|
|
|
|
- type: queue_timeout # 任务排队超时告警
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
threshold: 100
|
2023-08-30 14:17:23 +08:00
|
|
|
|
datasource:
|
|
|
|
|
|
druid:
|
|
|
|
|
|
initial-size: 5 #初始化时建立物理连接的个数
|
|
|
|
|
|
min-idle: 15 #最小连接池数量
|
|
|
|
|
|
maxActive: 30 #最大连接池数量
|
|
|
|
|
|
maxWait: 3000 #获取连接时最大等待时间,单位毫秒
|
|
|
|
|
|
#申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。
|
|
|
|
|
|
test-while-idle: true
|
|
|
|
|
|
time-between-eviction-runs-millis: 300000 #既作为检测的间隔时间又作为test-while-idle执行的依据
|
|
|
|
|
|
min-evictable-idle-time-millis: 900000 #销毁线程时检测当前连接的最后活动时间和当前时间差大于该值时,关闭当前连接
|
|
|
|
|
|
#用来检测连接是否有效的sql
|
|
|
|
|
|
#mysql中为 select 'x'
|
|
|
|
|
|
#oracle中为 select 1 from dual
|
|
|
|
|
|
validation-query: SELECT 'x'
|
|
|
|
|
|
test-on-borrow: true #申请连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
|
|
|
|
|
|
test-on-return: false #归还连接时会执行validationQuery检测连接是否有效,开启会降低性能,默认为true
|
|
|
|
|
|
exception-sorter: true #当数据库抛出不可恢复的异常时,抛弃该连接
|
|
|
|
|
|
pool-prepared-statements: true #是否缓存preparedStatement,mysql5.5+建议开启
|
|
|
|
|
|
max-pool-prepared-statement-per-connection-size: 20 #当值大于20时poolPreparedStatements会自动修改为true
|
|
|
|
|
|
#通过connectProperties属性来打开mergeSql功能;慢SQL记录
|
|
|
|
|
|
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
|
|
|
|
|
|
use-global-data-source-stat: true #合并多个DruidDataSource的监控数据
|
|
|
|
|
|
#filters通过别名的方式配置扩展插件,常用的插件有:
|
|
|
|
|
|
#监控统计用的filter:stat 日志用的filter:log4j 防御sql注入的filter:wall
|
|
|
|
|
|
filter:
|
|
|
|
|
|
stat:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
# 记录慢SQL
|
|
|
|
|
|
log-slow-sql: true
|
|
|
|
|
|
slow-sql-millis: 1000
|
|
|
|
|
|
merge-sql: true
|
|
|
|
|
|
wall:
|
|
|
|
|
|
config:
|
|
|
|
|
|
multi-statement-allow: true
|
|
|
|
|
|
#设置访问druid监控页面的拦截路径及账号和密码,默认没有
|
|
|
|
|
|
stat-view-servlet:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
url-pattern: /druid/*
|
|
|
|
|
|
login-username: admin
|
|
|
|
|
|
login-password: admin
|
2023-06-15 10:20:50 +08:00
|
|
|
|
freemarker:
|
|
|
|
|
|
check-template-location: false
|
|
|
|
|
|
profiles:
|
2023-11-23 15:12:15 +08:00
|
|
|
|
active: dev
|
2023-06-15 10:20:50 +08:00
|
|
|
|
jackson:
|
|
|
|
|
|
time-zone: GMT+8
|
|
|
|
|
|
data:
|
|
|
|
|
|
redis:
|
|
|
|
|
|
repositories:
|
|
|
|
|
|
enabled: false
|
2023-09-11 21:20:42 +08:00
|
|
|
|
#
|
|
|
|
|
|
# #配置 Jpa
|
|
|
|
|
|
# jpa:
|
|
|
|
|
|
# hibernate:
|
|
|
|
|
|
# ddl-auto: none
|
|
|
|
|
|
# open-in-view: true
|
|
|
|
|
|
# properties:
|
|
|
|
|
|
# hibernate:
|
|
|
|
|
|
# dialect: org.hibernate.dialect.MySQL5InnoDBDialect
|
|
|
|
|
|
# enable_lazy_load_no_trans: true
|
2023-06-15 10:20:50 +08:00
|
|
|
|
task:
|
|
|
|
|
|
pool:
|
|
|
|
|
|
# 核心线程池大小
|
|
|
|
|
|
core-pool-size: 10
|
|
|
|
|
|
# 最大线程数
|
|
|
|
|
|
max-pool-size: 30
|
|
|
|
|
|
# 活跃时间
|
|
|
|
|
|
keep-alive-seconds: 60
|
|
|
|
|
|
# 队列容量
|
|
|
|
|
|
queue-capacity: 50
|
|
|
|
|
|
|
|
|
|
|
|
#七牛云
|
|
|
|
|
|
qiniu:
|
|
|
|
|
|
# 文件大小 /M
|
|
|
|
|
|
max-size: 15
|
|
|
|
|
|
|
|
|
|
|
|
#邮箱验证码有效时间/秒
|
|
|
|
|
|
code:
|
|
|
|
|
|
expiration: 300
|
|
|
|
|
|
|
|
|
|
|
|
#密码加密传输,前端公钥加密,后端私钥解密
|
|
|
|
|
|
rsa:
|
|
|
|
|
|
private_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdbHkB8mp0f3FE0GYP3AYPaJF7jUd1M0XxFSE2ceK3k2kw20YvQ09NJKk+OMjWQl9WitG9pB6tSCQIDAQABAkA2SimBrWC2/wvauBuYqjCFwLvYiRYqZKThUS3MZlebXJiLB+Ue/gUifAAKIg1avttUZsHBHrop4qfJCwAI0+YRAiEA+W3NK/RaXtnRqmoUUkb59zsZUBLpvZgQPfj1MhyHDz0CIQDYhsAhPJ3mgS64NbUZmGWuuNKp5coY2GIj/zYDMJp6vQIgUueLFXv/eZ1ekgz2Oi67MNCk5jeTF2BurZqNLR3MSmUCIFT3Q6uHMtsB9Eha4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3tTbklZkD2A==
|
|
|
|
|
|
logging:
|
|
|
|
|
|
file:
|
|
|
|
|
|
path: C:\log\wms
|
|
|
|
|
|
config: classpath:logback-spring.xml
|
|
|
|
|
|
# sa-token白名单配置
|
|
|
|
|
|
security:
|
|
|
|
|
|
# 排除路径
|
|
|
|
|
|
excludes:
|
|
|
|
|
|
# 认证
|
|
|
|
|
|
- /auth/login
|
|
|
|
|
|
- /auth/code
|
|
|
|
|
|
- /auth/logout
|
|
|
|
|
|
- /sys-user-do/**
|
|
|
|
|
|
# swagger
|
|
|
|
|
|
- /swagger-ui.html
|
|
|
|
|
|
- /swagger-resources/**
|
|
|
|
|
|
- /webjars/**
|
|
|
|
|
|
- /file/**
|
|
|
|
|
|
- /webSocket/**
|
|
|
|
|
|
# 静态资源
|
|
|
|
|
|
- /*.html
|
|
|
|
|
|
- /**/*.html
|
|
|
|
|
|
- /**/*.css
|
|
|
|
|
|
- /**/*.js
|
|
|
|
|
|
# swagger 文档配置
|
|
|
|
|
|
- /favicon.ico
|
|
|
|
|
|
- /*/api-docs
|
|
|
|
|
|
- /*/api-docs/**
|
|
|
|
|
|
# druid 监控配置
|
|
|
|
|
|
- /druid/**
|
|
|
|
|
|
# actuator 监控配置
|
|
|
|
|
|
- /actuator
|
|
|
|
|
|
- /actuator/**
|
|
|
|
|
|
# 上传
|
|
|
|
|
|
- /api/localStorage/pictures
|
|
|
|
|
|
# 参数
|
|
|
|
|
|
- /api/param/getValueByCode
|
|
|
|
|
|
mybatis-plus:
|
|
|
|
|
|
configuration:
|
|
|
|
|
|
map-underscore-to-camel-case: false
|
2023-10-20 11:21:54 +08:00
|
|
|
|
jdbc-type-for-null: null
|
2023-11-20 10:05:12 +08:00
|
|
|
|
log-impl: org.nl.config.mybatis.MyStdOutImpl
|
2023-06-15 10:20:50 +08:00
|
|
|
|
mapper-locations:
|
|
|
|
|
|
- classpath:org.nl.**.mapper/*.xml
|
|
|
|
|
|
global-config:
|
|
|
|
|
|
db-config:
|
|
|
|
|
|
id-type: INPUT
|
2023-12-12 13:46:54 +08:00
|
|
|
|
|
|
|
|
|
|
lucene:
|
|
|
|
|
|
index:
|
|
|
|
|
|
path: D:\lucene\index
|