|
|
|
server:
|
|
|
|
port: 8010
|
|
|
|
tomcat:
|
|
|
|
accept-count: 1000
|
|
|
|
max-connections: 10000
|
|
|
|
max-threads: 800
|
|
|
|
min-spare-threads: 50
|
|
|
|
#配置数据源
|
|
|
|
spring:
|
|
|
|
datasource:
|
|
|
|
druid:
|
|
|
|
db-type: com.alibaba.druid.pool.DruidDataSource
|
|
|
|
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
|
|
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:yongyu_lms2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
|
|
|
# url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:nl-sso-server}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
|
|
|
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:nl_platform}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
|
|
|
username: ${DB_USER:root}
|
|
|
|
password: ${DB_PWD:942464Yy}
|
|
|
|
# password: ${DB_PWD:12356}
|
|
|
|
# 初始连接数
|
|
|
|
initial-size: 5
|
|
|
|
# 最小连接数
|
|
|
|
min-idle: 15
|
|
|
|
# 最大连接数
|
|
|
|
max-active: 30
|
|
|
|
# 超时时间(以秒数为单位)
|
|
|
|
remove-abandoned-timeout: 180
|
|
|
|
# 获取连接超时时间
|
|
|
|
max-wait: 3000
|
|
|
|
# 连接有效性检测时间
|
|
|
|
time-between-eviction-runs-millis: 60000
|
|
|
|
# 连接在池中最小生存的时间
|
|
|
|
min-evictable-idle-time-millis: 300000
|
|
|
|
# 连接在池中最大生存的时间
|
|
|
|
max-evictable-idle-time-millis: 900000
|
|
|
|
# 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除
|
|
|
|
test-while-idle: true
|
|
|
|
# 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个
|
|
|
|
test-on-borrow: true
|
|
|
|
# 是否在归还到池中前进行检验
|
|
|
|
test-on-return: false
|
|
|
|
# 检测连接是否有效
|
|
|
|
validation-query: select 1
|
|
|
|
# 配置监控统计
|
|
|
|
webStatFilter:
|
|
|
|
enabled: true
|
|
|
|
stat-view-servlet:
|
|
|
|
enabled: true
|
|
|
|
url-pattern: /druid/*
|
|
|
|
reset-enable: false
|
|
|
|
filter:
|
|
|
|
stat:
|
|
|
|
enabled: true
|
|
|
|
# 记录慢SQL
|
|
|
|
log-slow-sql: true
|
|
|
|
slow-sql-millis: 1000
|
|
|
|
merge-sql: true
|
|
|
|
wall:
|
|
|
|
config:
|
|
|
|
multi-statement-allow: true
|
|
|
|
redis:
|
|
|
|
#数据库索引
|
|
|
|
database: ${REDIS_DB:2}
|
|
|
|
host: 47.96.133.178
|
|
|
|
# Redis服务器连接端口
|
|
|
|
port: 6479
|
|
|
|
# Redis服务器连接密码(默认为空)
|
|
|
|
password: 942464Yy
|
|
|
|
redisson:
|
|
|
|
config: |
|
|
|
|
threads: 4
|
|
|
|
nettyThreads: 4
|
|
|
|
singleServerConfig:
|
|
|
|
connectionMinimumIdleSize: 8
|
|
|
|
connectionPoolSize: 8
|
|
|
|
address: redis://47.96.133.178:6479
|
|
|
|
password: 942464Yy
|
|
|
|
idleConnectionTimeout: 10000
|
|
|
|
timeout: 3000
|
|
|
|
|
|
|
|
flyway: # flyway 数据库 DDL 版本控制
|
|
|
|
enabled: true # 正式环境才开启
|
|
|
|
clean-disabled: true # 禁用数据库清理
|
|
|
|
encoding: UTF-8
|
|
|
|
locations: classpath:db
|
|
|
|
# flyway 会在库中创建此名称元数据表,用于记录所有版本演化和状态,同一个库不同项目可能冲突,每个项目一张表来记录
|
|
|
|
table: flyway_schema_history_nl_platform #TODO 值的后缀指定为当前项目名称
|
|
|
|
baseline-version: 1 # 基线版本默认开始序号 默认为 1
|
|
|
|
baseline-on-migrate: true # 针对非空数据库是否默认调用基线版本,为空的话默认会调用基线版本
|
|
|
|
placeholders: # 定义 afterMigrateError.sql 要清理的元数据表表名
|
|
|
|
flyway-table: ${spring.flyway.table}
|
|
|
|
dynamic:
|
|
|
|
tp:
|
|
|
|
enabled: true
|
|
|
|
enabledBanner: true # 是否开启banner打印,默认true
|
|
|
|
enabledCollect: true # 是否开启监控指标采集,默认false
|
|
|
|
collectorTypes: micrometer,logging # 监控数据采集器类型(logging | micrometer | internal_logging),默认micrometer
|
|
|
|
logPath: /home/logs888 # 监控日志数据路径,默认 ${user.home}/logs
|
|
|
|
monitorInterval: 5 # 监控时间间隔(报警判断、指标采集),默认5s
|
|
|
|
tomcatTp: # tomcat web server线程池配置
|
|
|
|
corePoolSize: 100
|
|
|
|
maximumPoolSize: 400
|
|
|
|
keepAliveTime: 60
|
|
|
|
executors: # 动态线程池配置,都有默认值,采用默认值的可以不配置该项,减少配置量
|
|
|
|
- threadPoolName: dtpExecutor1
|
|
|
|
executorType: common # 线程池类型common、eager:适用于io密集型
|
|
|
|
corePoolSize: 6
|
|
|
|
maximumPoolSize: 8
|
|
|
|
queueCapacity: 200
|
|
|
|
queueType: VariableLinkedBlockingQueue # 任务队列,查看源码QueueTypeEnum枚举类
|
|
|
|
rejectedHandlerType: CallerRunsPolicy # 拒绝策略,查看RejectedTypeEnum枚举类
|
|
|
|
keepAliveTime: 50
|
|
|
|
allowCoreThreadTimeOut: false # 是否允许核心线程池超时
|
|
|
|
threadNamePrefix: test # 线程名前缀
|
|
|
|
waitForTasksToCompleteOnShutdown: false # 参考spring线程池设计,优雅关闭线程池
|
|
|
|
awaitTerminationSeconds: 5 # 单位(s)
|
|
|
|
preStartAllCoreThreads: false # 是否预热所有核心线程,默认false
|
|
|
|
runTimeout: 200 # 任务执行超时阈值,目前只做告警用,单位(ms)
|
|
|
|
queueTimeout: 100 # 任务在队列等待超时阈值,目前只做告警用,单位(ms)
|
|
|
|
taskWrapperNames: [ "ttl" ] # 任务包装器名称,集成TaskWrapper接口
|
|
|
|
notifyItems: # 报警项,不配置自动会按默认值配置(变更通知、容量报警、活性报警、拒绝报警、任务超时报警)
|
|
|
|
- type: capacity # 报警项类型,查看源码 NotifyTypeEnum枚举类
|
|
|
|
enabled: true
|
|
|
|
threshold: 80 # 报警阈值
|
|
|
|
platforms: [ ding,wechat ] # 可选配置,不配置默认拿上层platforms配置的所以平台
|
|
|
|
interval: 120 # 报警间隔(单位:s)
|
|
|
|
- type: change
|
|
|
|
enabled: true
|
|
|
|
- type: liveness
|
|
|
|
enabled: true
|
|
|
|
threshold: 80
|
|
|
|
- type: reject
|
|
|
|
enabled: true
|
|
|
|
threshold: 1
|
|
|
|
- type: run_timeout
|
|
|
|
enabled: true
|
|
|
|
threshold: 1
|
|
|
|
- type: queue_timeout
|
|
|
|
enabled: true
|
|
|
|
threshold: 1
|
|
|
|
quartz:
|
|
|
|
properties:
|
|
|
|
org:
|
|
|
|
quartz:
|
|
|
|
jobStore:
|
|
|
|
threadPool:
|
|
|
|
threadCount: 14
|
|
|
|
class: org.nl.system.service.quartz.SimpleThreadPool
|
|
|
|
scheduler-name: scheduler
|
|
|
|
# 登录相关配置
|
|
|
|
login:
|
|
|
|
# 登录缓存
|
|
|
|
cache-enable: true
|
|
|
|
# 是否限制单用户登录
|
|
|
|
single-login: false
|
|
|
|
# 验证码
|
|
|
|
login-code:
|
|
|
|
# 验证码类型配置 查看 LoginProperties 类
|
|
|
|
code-type: arithmetic
|
|
|
|
# 登录图形验证码有效时间/分钟
|
|
|
|
expiration: 2
|
|
|
|
# 验证码高度
|
|
|
|
width: 111
|
|
|
|
# 验证码宽度
|
|
|
|
heigth: 36
|
|
|
|
# 内容长度
|
|
|
|
length: 2
|
|
|
|
# 字体名称,为空则使用默认字体
|
|
|
|
font-name:
|
|
|
|
# 字体大小
|
|
|
|
font-size: 25
|
|
|
|
|
|
|
|
#是否允许生成代码,生产环境设置为false
|
|
|
|
generator:
|
|
|
|
enabled: true
|
|
|
|
|
|
|
|
#是否开启 swagger-ui
|
|
|
|
swagger:
|
|
|
|
enabled: true
|
|
|
|
|
|
|
|
# IP 本地解析
|
|
|
|
ip:
|
|
|
|
local-parsing: true
|
|
|
|
|
|
|
|
# 文件存储路径
|
|
|
|
file:
|
|
|
|
mac:
|
|
|
|
path: ~/file/
|
|
|
|
avatar: ~/avatar/
|
|
|
|
linux:
|
|
|
|
path: /home/eladmin/file/
|
|
|
|
avatar: /home/eladmin/avatar/
|
|
|
|
windows:
|
|
|
|
path: C:\eladmin\file\
|
|
|
|
avatar: C:\eladmin\avatar\
|
|
|
|
# 文件大小 /M
|
|
|
|
maxSize: 100
|
|
|
|
avatarMaxSize: 5
|
|
|
|
logging:
|
|
|
|
file:
|
|
|
|
path: C:\log\wms
|
|
|
|
config: classpath:logback-spring.xml
|
|
|
|
|
|
|
|
# Sa-Token配置
|
|
|
|
sa-token:
|
|
|
|
# token 名称 (同时也是cookie名称)
|
|
|
|
token-name: Authorization
|
|
|
|
# token 有效期,单位s 默认30天, -1代表永不过期
|
|
|
|
timeout: 2592000
|
|
|
|
# token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
|
|
|
|
activity-timeout: -1
|
|
|
|
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
|
|
|
|
is-concurrent: true
|
|
|
|
# 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
|
|
|
|
is-share: false
|
|
|
|
# token风格
|
|
|
|
token-style: random-128
|
|
|
|
# 是否输出操作日志
|
|
|
|
is-log: false
|
|
|
|
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
|
|
|
# token 前缀
|
|
|
|
token-prefix:
|
|
|
|
cookie:
|
|
|
|
# 配置 Cookie 作用域
|
|
|
|
domain:
|
|
|
|
sso:
|
|
|
|
# Ticket有效期 (单位: 秒),默认五分钟
|
|
|
|
ticket-timeout: 300
|
|
|
|
# 所有允许的授权回调地址
|
|
|
|
allow-url: "*"
|
|
|
|
# 是否打开单点注销功能
|
|
|
|
is-slo: true
|
|
|
|
|
|
|
|
# ------- SSO-模式三相关配置 (下面的配置在SSO模式三并且 is-slo=true 时打开)
|
|
|
|
# 是否打开模式三
|
|
|
|
isHttp: true
|
|
|
|
# 接口调用秘钥(用于SSO模式三的单点注销功能)
|
|
|
|
secretkey: kQwIOrYvnXmSDkwEiFngrKidMcdrgKor
|
|
|
|
# ---- 除了以上配置项,你还需要为 Sa-Token 配置http请求处理器(文档有步骤说明)
|
|
|
|
is-read-cookie: true
|
|
|
|
is-print: false
|
|
|
|
# 未登录 StpUtil.getTokenSession() 设置值,获取值 @SaIgnore 得忽略接口
|
|
|
|
token-session-check-login: false
|
|
|
|
alone-redis:
|
|
|
|
# Redis数据库索引(默认为0)
|
|
|
|
database: 2
|
|
|
|
# Redis服务器地址
|
|
|
|
host: 47.96.133.178
|
|
|
|
# Redis服务器连接端口
|
|
|
|
port: 6479
|
|
|
|
# Redis服务器连接密码(默认为空)
|
|
|
|
password: 942464Yy
|
|
|
|
# 连接超时时间
|
|
|
|
timeout: 10s
|
|
|
|
|
|
|
|
loki:
|
|
|
|
url: http://localhost:3100/loki/api/v1
|
|
|
|
systemName: acs
|
|
|
|
|