server: port: 31000 logging: level: root: info org.flowable.engine.impl.persistence.entity.*: debug org.flowable.task.service.impl.persistence.entity.*: debug spring: datasource: # 【必须显式指定 type】jar 内置 application-dev.yml 是 MySQL 模板 # (type: com.mysql.cj.jdbc.MysqlDataSource);Spring Boot 外部 config 与 jar 内配置是 # 「按属性合并」而非整体替换——只去掉本文件的 type,会让 jar 内的 MysqlDataSource 复活, # 导致 MySQL 驱动去连 postgres URL 报 "Connector/J cannot handle jdbc:postgresql://..."。 # 原 PGSimpleDataSource 也是靠这行显式 type 压住 jar 内 MySQL 的;改池就把它换成 Hikari。 type: com.zaxxer.hikari.HikariDataSource driver-class-name: org.postgresql.Driver url: ${FLOW_DB_URL:jdbc:postgresql://cx-postgres:5432/jnpf_flow} username: ${FLOW_DB_USER:postgres} # 密码无默认值:由 compose 注入(值在 .env,见 .env.example) password: ${FLOW_DB_PASSWORD} hikari: # 原 PGSimpleDataSource 无池、每事务开/关连接 churn 大且突发无上限;换 Hikari 小而封顶。 # 15 够 Flowable 多引擎(bpmn/cmmn/dmn) timer+async 采集线程 + HTTP 请求共享,且 < 角色配额。 maximum-pool-size: 15 minimum-idle: 2 connection-timeout: 5000 # 库满时 5s 快速失败,不无限挂起拖垮采集线程 keepalive-time: 120000 # 空闲连接保活,防被 PG/防火墙静默断开 max-lifetime: 1800000 # 连接最长寿命 30min,定期轮换避免老化