2026-09-06 20:53:14 +08:00
|
|
|
|
# 开发/影子对拍环境 profile(U03/N32 + U07):
|
|
|
|
|
|
# - /env、/beans 放开以便“改值—回读”与装配核验(生产 profile 不加载本文件)
|
2026-09-07 10:27:44 +08:00
|
|
|
|
# - msgx.stubs=true:无 MySQL/Redis/Kafka 时以内存 stub 跑通「启动 + compat HTTP 写 +
|
|
|
|
|
|
# 主泵/投递循环」(生产主路径 JDBC 轮询 InboxPoller 属 U05,stub 未覆盖)
|
2026-09-06 20:53:14 +08:00
|
|
|
|
# - msgx.pipeline.autostart=true:启动即拉起 Pump/Dispatcher 专用线程
|
2026-09-06 17:58:39 +08:00
|
|
|
|
# 启动:MICRONAUT_ENVIRONMENTS=dev ./gradlew run
|
2026-09-06 20:53:14 +08:00
|
|
|
|
msgx:
|
|
|
|
|
|
register-eureka: false
|
|
|
|
|
|
stubs: true
|
|
|
|
|
|
pipeline:
|
|
|
|
|
|
autostart: true
|
|
|
|
|
|
|
2026-09-07 07:39:57 +08:00
|
|
|
|
# dev 不注册也不发现(stub):关 eureka discovery,避免 discovery 客户端健康指示器
|
|
|
|
|
|
# 因无 eureka 服务而把 /health 拉成 DOWN
|
|
|
|
|
|
eureka:
|
|
|
|
|
|
client:
|
|
|
|
|
|
discovery:
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
|
|
|
|
# DB 仅在真实实装接入后需要;stub 模式不建连——datasources.default.enabled=false 经
|
2026-09-07 15:11:06 +08:00
|
|
|
|
# micronaut-jdbc 的 JdbcDataSourceEnabled 条件排除 DataSource bean("stub 不建连"落地)。
|
|
|
|
|
|
# 遵循 ACM2-12/ACM2-13 自有数据库(PostgreSQL)口径。真实接入时:设 MSGX_PG_URL + enabled=true。
|
2026-09-07 07:39:57 +08:00
|
|
|
|
datasources:
|
|
|
|
|
|
default:
|
|
|
|
|
|
enabled: false
|
2026-09-07 15:11:06 +08:00
|
|
|
|
url: jdbc:postgresql://${MSGX_PG_HOST:127.0.0.1}:${MSGX_PG_PORT:5432}/${MSGX_PG_NAME:msgx}
|
|
|
|
|
|
username: ${MSGX_PG_USER:msgx_dev}
|
|
|
|
|
|
password: ${MSGX_PG_PASSWORD:msgx_dev_pass}
|
|
|
|
|
|
driver-class-name: org.postgresql.Driver
|
2026-09-07 07:39:57 +08:00
|
|
|
|
|
2026-09-07 15:11:06 +08:00
|
|
|
|
# 共享信箱 MySQL 适配配置(ACM2-12/ACM2-13):
|
|
|
|
|
|
mailbox:
|
|
|
|
|
|
shared-mysql:
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
url: jdbc:mysql://${MSGX_MAILBOX_HOST:127.0.0.1}:${MSGX_MAILBOX_PORT:3306}/${MSGX_MAILBOX_NAME:cdairport}?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&characterEncoding=utf8mb4
|
|
|
|
|
|
username: ${MSGX_MAILBOX_USER:msgx_dev}
|
|
|
|
|
|
password: ${MSGX_MAILBOX_PASSWORD:msgx_dev_pass}
|
|
|
|
|
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
2026-09-07 07:39:57 +08:00
|
|
|
|
# stub 模式无 DataSource:Flyway 显式关闭(主配置默认 enabled:true 只作用于有 DataSource 的环境)
|
2026-09-06 20:53:14 +08:00
|
|
|
|
flyway:
|
|
|
|
|
|
datasources:
|
|
|
|
|
|
default:
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
|
2026-09-07 07:39:57 +08:00
|
|
|
|
# stub 模式无真实 Redis/Kafka:关掉 micronaut 自带的 RedisHealthIndicator / KafkaHealthIndicator
|
|
|
|
|
|
# (二者装配需构造真实 client/config;实测未设 MSGX_REDIS_URI / MSGX_KAFKA_SERVERS 时 /health 整体报 500)。
|
|
|
|
|
|
# 健康由自定义 redis-flight-store / kafka-delivery indicator 承担(stub ping=true → UP)。
|
|
|
|
|
|
redis:
|
|
|
|
|
|
health:
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
|
|
|
|
kafka:
|
|
|
|
|
|
health:
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
# stub 无真实 Kafka:仍给 servers 合法默认(Micronaut 占位符默认值内嵌冒号会解析坏,
|
|
|
|
|
|
# 故拆 host/port 两个无冒号默认;字面冒号留在占位符之间)。真实接入时设 MSGX_KAFKA_HOST/PORT。
|
|
|
|
|
|
bootstrap:
|
|
|
|
|
|
servers: ${MSGX_KAFKA_HOST:127.0.0.1}:${MSGX_KAFKA_PORT:9092}
|
|
|
|
|
|
|
|
|
|
|
|
# 管理端点(U03/N32):/env 默认禁用、/beans 默认 enabled+sensitive——dev 显式放开。
|
|
|
|
|
|
# 注意:端点配置前缀是顶层 `endpoints`(micronaut.endpoints.* 是死配置,实测不生效)。
|
|
|
|
|
|
endpoints:
|
|
|
|
|
|
env:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
sensitive: false
|
|
|
|
|
|
beans:
|
|
|
|
|
|
enabled: true
|
|
|
|
|
|
sensitive: false
|
|
|
|
|
|
health:
|
|
|
|
|
|
details-visible: ANONYMOUS # dev 排障:无鉴权也显示各 indicator 明细(生产不加载本文件)
|
2026-09-06 20:53:14 +08:00
|
|
|
|
|
2026-09-06 17:58:39 +08:00
|
|
|
|
micronaut:
|
|
|
|
|
|
server:
|
|
|
|
|
|
port: 8080
|