Files
workspace/code/fms/fms-api/target/classes/application.yaml
T
2026-08-30 21:50:03 +08:00

43 lines
1.5 KiB
YAML

server:
port: 8088
servlet:
context-path: /api
spring:
application:
name: fms-api
fms:
auth:
jwt-secret: "${FMS_JWT_SECRET:fms-api-development-jwt-secret-change-me}"
jwt-expiration: 24h
database:
config-dir: ./config/dbconfigs
# 机构配置文件变更检测周期(文件监听的兜底,正常由监听毫秒级触发;设为 0s 关闭轮询)
refresh-check-interval: 30s
# 配置变更切换后,旧连接池延迟关闭时间,等待在途请求归还连接
retired-pool-close-delay: 60s
pool:
# 建池时先建 1 条物理连接:配置指向不可达的库时快速失败,保留旧池不切换
initial-size: 1
# 保留 1 条温连接:min-idle=0 时 keepAlive 无连接可保活,空闲连接被回收后每次请求都要跨公网重新建连
min-idle: 1
max-active: 10
# 公网建连本身可能超过 5s(握手上限 10s),池空时需留够等待时间
max-wait: 10000
validation-query: SELECT 1
test-while-idle: true
# 每次借连接都做一次跨公网 SELECT 1,既慢又放大失败面,由 testWhileIdle + keepAlive 兜底
test-on-borrow: false
test-on-return: false
time-between-eviction-runs: 60s
# 原 30s:业务稍一空闲连接就被销毁,每个请求都要重新建连,公网建连超时概率被大幅放大
min-evictable-idle-time: 10m
file:
storage-type: local
local:
storage-dir: ./data/files
url-prefix: /api/file/static
oss:
g3oss-url: http://g3oss.g3soft.cn:8082