Files
ljwx-health/ljwx-boot/ljwx-boot-admin/src/main/resources/application.yml
T
BrunoGaoSZ 76f5f9c402 feat: add GitOps deployment with GitHub hosted runner
- Add GitOps workflows for automated deployment
- Add remote deployment workflow (GitHub hosted runner)
- Add KUBECONFIG export script
- Add comprehensive documentation (quick start guides, comparison)
- Add verification scripts for GitOps setup
- Update CLAUDE.md with GitOps instructions

Test: verify GitOps deployment workflow
2025-12-22 15:29:31 +01:00

169 lines
4.4 KiB
YAML

server:
# 服务端口
port: 9998
# 监控配置 - 专门为Prometheus监控设计
management:
endpoints:
web:
exposure:
include: "*" # 暴露所有端点
base-path: /actuator
cors:
allowed-origins: "*"
allowed-methods: "*"
enabled-by-default: true
endpoint:
health:
show-details: always
show-components: always
enabled: true
probes:
enabled: true
metrics:
enabled: true
prometheus:
enabled: true
info:
enabled: true
env:
enabled: true
beans:
enabled: true
health:
db:
enabled: true
datasource:
enabled: true
redis:
enabled: true
diskspace:
enabled: true
metrics:
export:
prometheus:
enabled: true
step: 30s # 30秒数据间隔
tags:
application: ljwx-boot # 应用标识
environment: docker # 环境标识
# OpenTelemetry 分布式链路追踪配置
tracing:
sampling:
probability: ${OTEL_TRACES_SAMPLER_ARG:0.1} # 默认10%采样率
otlp:
tracing:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4317}
compression: gzip
timeout: 10s
spring:
ai:
ollama:
base-url: http://192.168.1.83:11434
chat:
enabled: true
model: deepseek-r1:70b
options:
temperature: 0.7
# Redis 8.x 兼容配置 - 主配置
data:
redis:
url: redis://default:${REDIS_PASSWORD:123456}@${REDIS_HOST:localhost}:${REDIS_PORT:6379}/${REDIS_DB:1}
connect-timeout: 10000ms
timeout: 5000ms
lettuce:
pool:
enabled: true
max-active: 8
max-idle: 8
min-idle: 0
client-options:
ping-before-activate-connection: false
auto-reconnect: true
# Flyway 数据库迁移配置
flyway:
enabled: true
baseline-on-migrate: true # 关键:已有库不重放历史脚本,直接从 baseline 开始
baseline-version: 0 # Baseline版本号(已有数据库视为版本0)
locations: classpath:db/migration # 迁移脚本位置
sql-migration-prefix: V # SQL迁移文件前缀
sql-migration-separator: __ # 版本号与描述的分隔符
sql-migration-suffixes: .sql # SQL迁移文件后缀
validate-on-migrate: true # 迁移前验证脚本
clean-disabled: true # 禁用clean操作(生产环境安全性)
out-of-order: false # 不允许乱序执行迁移
profiles:
# 激活环境
active: ${SPRING_PROFILES_ACTIVE:common}
application:
name: ljwx-boot-admin
main:
allow-circular-references: true
allow-bean-definition-overriding: true
config:
import:
- classpath:config/druid.yml
- classpath:config/mybatis-plus.yml
- classpath:config/swagger.yml
# - classpath:config/quartz.yml # 临时禁用Quartz配置
task:
scheduling:
enabled: true # 启用定时任务
pool:
size: 10 # 定时任务线程池大小
# LJWX 自定义配置
ljwx:
# Logo上传配置
logo:
# 上传文件存储根路径 - 支持环境变量配置
upload-path: ${LJWX_LOGO_UPLOAD_PATH:uploads}
# 默认logo文件路径
default-logo: ${LJWX_DEFAULT_LOGO_PATH:uploads/logos/defaults/default-logo.svg}
# 许可证配置
license:
enabled: ${LJWX_LICENSE_ENABLED:false}
file-path: ${LJWX_LICENSE_FILE:./license/ljwx.lic}
check-interval: ${LJWX_LICENSE_CHECK_INTERVAL:300}
trial-mode: ${LJWX_LICENSE_TRIAL_MODE:false}
# Ollama 健康预测配置
ollama:
api:
url: ${OLLAMA_API_URL:http://192.168.1.83:11434}
model:
name: ${OLLAMA_MODEL_NAME:ljwx-health-enhanced:latest}
prediction:
timeout: ${OLLAMA_PREDICTION_TIMEOUT:30000}
connection:
timeout: ${OLLAMA_CONNECTION_TIMEOUT:30000}
read:
timeout: ${OLLAMA_READ_TIMEOUT:60000}
# 健康数据去重配置
health:
dedup:
# 是否使用Redis去重 (true=推荐, false=内存降级)
use-redis: true
# Redis去重Key的TTL(小时)
ttl-hours: 24
# 是否启用内容哈希去重
use-content-hash: true
# 内存Set清理间隔(毫秒,仅内存模式)
memory-cleanup-interval-ms: 3600000
# 内存Set警告阈值
memory-warning-threshold: 100000
# P0-4 缓存自动失效配置
cache:
# 是否启用自动缓存失效
auto-invalidation: true
# 缓存失效延迟(毫秒),避免并发问题
invalidation-delay-ms: 1000