server: port: 8080 spring: # 文件上传配置 servlet: multipart: enabled: true max-file-size: 1GB # 单个文件最大大小 max-request-size: 1GB # 整个请求最大大小 file-size-threshold: 0 # 文件写入磁盘的阈值 datasource: url: jdbc:mysql://172.22.222.111:3306/deploy-ease-platform?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true&allowMultiQueries=true username: deploy-ease-platform password: Qichen5210523 driver-class-name: com.mysql.cj.jdbc.Driver hikari: # 连接池最大连接数(方案2:充足配置) # 峰值并发:服务器监控(150) + Jenkins同步(100) + Git同步(100) + Web请求(20) ≈ 370 # 预留buffer,设置为200 maximum-pool-size: 200 # 最小空闲连接数(保持足够的空闲连接,减少高峰时创建连接的开销) minimum-idle: 80 # 空闲连接超时时间,默认600000(10分钟) idle-timeout: 300000 # 连接最大存活时间,默认1800000(30分钟) max-lifetime: 1800000 # 连接超时时间(优化:防止长时间等待) connection-timeout: 30000 # 测试连接是否有效的查询语句 connection-test-query: SELECT 1 # 验证连接的超时时间,默认5000(5秒) validation-timeout: 5000 # 从连接池获取连接时是否检查连接有效性 connection-init-sql: SELECT 1 # 每隔多久检测一次连接的有效性 keepalive-time: 60000 # 是否自动提交事务 auto-commit: true # 连接池名称 pool-name: HikariCP-Pool # 是否允许JMX管理连接池 register-mbeans: true # 连接泄漏检测阈值(毫秒),超过此时间未归还的连接将被记录 # Jenkins 构建轮询最长30分钟,设置为35分钟避免误报 leak-detection-threshold: 2100000 jpa: hibernate: ddl-auto: update show-sql: true properties: hibernate: format_sql: false use_sql_comments: true dialect: org.hibernate.dialect.MySQL8Dialect jdbc: time_zone: Asia/Shanghai mvc: log-request-details: true messages: basename: messages encoding: UTF-8 fallback-to-system-locale: false messages: basename: messages encoding: UTF-8 fallback-to-system-locale: false always-use-message-format: false use-code-as-default-message: true cache-duration: 3600 liquibase: enabled: true change-log: classpath:db/changelog/db.changelog-master.xml drop-first: false default-schema: deploy-ease-platform contexts: default data: redis: host: 172.22.222.111 password: Qichen5210523... port: 6379 database: 7 timeout: 6000ms flowable: database-schema-update: true # id-generator: org.flowable.common.engine.impl.db.DbIdGenerator #flowable: # async-executor: # default-async-job-acquire-wait-time: 60000 # default-timer-job-acquire-wait-time: 60000 # max-async-jobs-due-per-acquisition: 1 # retry-wait-time-in-millis: 60000 # number-of-retries: 1 # # 自动清理死信任务 # move-to-dead-letter-on-failure: true # # 死信任务的保留时间(毫秒) # dead-letter-timeout: 1000 logging: level: springframework: DEBUG org.springframework.web: DEBUG org.springframework.context.i18n: DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping: TRACE org.hibernate.SQL: DEBUG org.hibernate.type.descriptor.sql: TRACE org.hibernate.type.descriptor.sql.BasicBinder: TRACE org.hibernate.orm.jdbc.bind: TRACE org.hibernate.type: TRACE com.querydsl.jpa: DEBUG com.qqchen.deploy.backend.framework.utils.EntityPathResolver: DEBUG com.qqchen.deploy.backend: DEBUG # 屏蔽 SSHJ 底层日志(SecureRandom、Transport 等无业务价值的日志) net.schmizz.sshj: WARN # 日志文件配置 file: name: logs/deploy-ease.log # 日志文件路径 logback: rollingpolicy: # 日志文件名称模式(按日期归档) file-name-pattern: logs/deploy-ease-%d{yyyy-MM-dd}.%i.log.gz # 单个日志文件最大大小 max-file-size: 100MB # 日志文件保留天数 max-history: 30 # 日志文件总大小上限 total-size-cap: 10GB # 是否在启动时清理历史日志 clean-history-on-start: false pattern: # 日志输出格式 console: '%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } --- [%15.15t] %-40.40logger{39} : %m%n' file: '%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } --- [%15.15t] %-40.40logger{39} : %m%n' # 监控配置 management: endpoints: web: exposure: # 添加 threaddump 用于线程监控,heapdump 用于内存分析 include: health,metrics,info,threaddump,heapdump,env,loggers metrics: enable: hikari: true tomcat: true jvm: true system: true jwt: secret: 'thisIsAVeryVerySecretKeyForJwtTokenGenerationAndValidation123456789' expiration: 86400 # Security 白名单配置 security: whitelist: paths: - /api/v1/user/login - /api/v1/user/register - /api/v1/tenant/list - /api/v1/server-ssh/*/files/** - /swagger-ui/** - /v3/api-docs/** - /actuator/** jackson: time-zone: Asia/Shanghai # 部署平台配置 deploy: # 敏感数据加密配置 encryption: # 加密密钥(生产环境建议使用环境变量 ENCRYPTION_SECRET_KEY) # 密钥长度至少32位,建议使用强随机字符串 secret-key: ${ENCRYPTION_SECRET_KEY:deploy-ease-platform-secret-key-2025} # 加密盐值(生产环境建议使用环境变量 ENCRYPTION_SALT) # 盐值必须是16位十六进制字符串(只能包含0-9和a-f) salt: ${ENCRYPTION_SALT:a1b2c3d4e5f6a7b8} # 系统版本发布通知配置 notification: release: channel-id: 2 # 版本通知渠道ID