Files
orion-visor/orion-visor-launch/src/main/resources/application.yaml
2025-10-27 09:50:17 +08:00

272 lines
6.9 KiB
YAML

server:
port: 9200
spring:
application:
name: orion-visor
profiles:
active: dev
main:
# 允许循环依赖
allow-circular-references: true
servlet:
# 文件上传相关配置项
multipart:
# 单个文件大小
max-file-size: 128MB
# 消息体大小
max-request-size: 128MB
mvc:
pathmatch:
matching-strategy: ANT_PATH_MATCHER
async:
# 异步请求时间 30min
request-timeout: 1800000
task:
scheduling:
thread-name-prefix: scheduling-task-
pool:
size: 4
datasource:
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
# 初始连接数
initial-size: 5
# 最小连接池数量
min-idle: 5
# 最大连接池数量
max-active: 20
# 配置获取连接等待超时的时间
max-wait: 600000
# 检测间隔
time-between-eviction-runs-millis: 60000
# 最小生存的时间
min-evictable-idle-time-millis: 300000
# 最大生存的时间
max-evictable-idle-time-millis: 900000
validation-query: SELECT 1
# 控制台
stat-view-servlet:
enabled: true
url-pattern: /druid/*
login-username:
login-password:
web-stat-filter:
enabled: true
filter:
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 800
merge-sql: true
wall:
config:
multi-statement-allow: true
redis:
database: 0
connect-timeout: 5000
timeout: 3000
cache:
type: REDIS
redis:
time-to-live: 1h
output:
ansi:
enabled: DETECT
quartz:
job-store-type: JDBC
overwrite-existing-jobs: false
jdbc:
initialize-schema: NEVER
properties:
org:
quartz:
scheduler:
# 实例 ID
instanceId: AUTO
instanceName: quartzScheduler
jobStore:
# 持久化配置
class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
useProperties: false
tablePrefix: QRTZ_
misfireThreshold: 60000
clusterCheckinInterval: 5000
isClustered: false
# 连接池
threadPool:
class: org.quartz.simpl.SimpleThreadPool
threadCount: 5
threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true
boot:
admin:
context-path: /admin
client:
enabled: true
url: http://127.0.0.1:${server.port}/${spring.boot.admin.context-path}
instance:
service-host-type: IP
server:
enabled: true
management:
endpoints:
enabled-by-default: true
web:
base-path: /actuator
exposure:
include: '*'
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
mapper-locations: classpath*:mapper/*Mapper.xml
global-config:
db-config:
logic-delete-field: deleted
logic-not-delete-value: 0
logic-delete-value: 1
springdoc:
api-docs:
enabled: true
path: /v3/api-docs
swagger-ui:
enabled: true
path: /swagger-ui
tags-sorter: alpha
operations-sorter: alpha
show-extensions: true
knife4j:
enable: true
setting:
language: ZH_CN
logging:
file:
path: ${user.home}/orion/logs/${spring.application.name}
name: ${logging.file.path}/app.log
logback:
rollingpolicy:
clean-history-on-start: false
file-name-pattern: ${logging.file.path}/rolling/rolling-%d{yyyy-MM-dd}.%i.gz
max-history: 30
max-file-size: 16MB
total-size-cap: 0B
pattern:
console: '%clr(%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%6p}) %boldBlue([%X{tid}]) %clr([%22.22t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}'
file: "%d{${LOG_DATEFORMAT_PATTERN:yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%6p} [%X{tid}] [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:%wEx}"
level:
org.dromara.visor.launch.controller.BootstrapController: INFO
# orion framework config
orion:
# 版本
version: @revision@
# 是否为演示模式
demo: false
# 前缀
prefix: /orion-visor
api:
# 公共 api 前缀
prefix: ${orion.prefix}/api
# 是否允许跨域
cors: true
# 获取 IP 的请求头
ip-headers: X-Forwarded-For,X-Real-IP
# 对外服务
expose:
# 暴露接口请求头
header: X-Server-Token
# 暴露接口请求头值
token: 96QEPoOChlMfAEPn
websocket:
# 公共 websocket 前缀
prefix: ${orion.prefix}/keep-alive
# 1MB
binary-buffer-size: 1048576
# 1MB
text-buffer-size: 1048576
# 30MIN
session-idle-timeout: 1800000
swagger:
# swagger 配置
author: Jiahang Li
title: orion-visor 运维平台
description: 一站式运维服务平台
version: ${orion.version}
url: https://github.com/dromara/orion-visor
email: ljh1553488six@139.com
license: Apache-2.0
license-url: https://github.com/dromara/orion-visor/blob/main/LICENSE
grouped-api:
infra:
group: "infra - 基建模块"
path: "infra"
asset:
group: "asset - 资产模块"
path: "asset"
exec:
group: "exec - 执行模块"
path: "exec"
terminal:
group: "terminal - 终端模块"
path: "terminal"
monitor:
group: "monitor - 监控模块"
path: "monitor"
logging:
# 全局日志打印
printer:
mode: PRETTY
expression: 'execution (* org.dromara.visor..*.controller..*.*(..))'
headers:
- User-Agent,Accept
- X-Agent-Version
# 下面引用了 需要注意
field:
ignore:
- password,beforePassword,newPassword,useNewPassword,publicKey,privateKey,privateKeyPassword
- accessKey,secretKey
- metrics
desensitize:
storage:
# 本地文件存储
local:
enabled: true
timestamp-prefix: false
date-directory: false
storage-path: ${user.home}
base-path: /orion/${spring.application.name}/storage
# 日志文件存储
logs:
enabled: true
timestamp-prefix: false
date-directory: false
storage-path: ${user.home}
base-path: /orion/${spring.application.name}/logs
security:
password-encoder-length: 4
# 匿名接口
permit-url:
- ${orion.api.prefix}/server/bootstrap/health
encrypt:
# aes加密器
aes:
working-mode: ECB
padding-mode: PKCS5_PADDING
# 加密密钥
secret-key: I66AndrKWrwXjtBL
use-generator-key: true
generator-key-length: 128
operator-log:
error-message-length: 255
user-agent-length: 128
ignore:
- ${orion.logging.printer.field.ignore[0]}
- ${orion.logging.printer.field.ignore[1]}
desensitize: