【发布时间】:2020-12-11 03:41:34
【问题描述】:
我们在云中的 docker 容器中运行我们的 micronaut 集成测试
我们在 docker 环境变量中设置 MICRONAUT_ENVIRONMENTS=staging,以强制我们的应用程序从 application-staging.yaml 读取配置值。
但是,micronaut 会自动添加“test”作为环境,然后从 application-test.yaml 中读取配置值。
根据文档 (https://docs.micronaut.io/2.2.1/guide/index.html#propertySource),加载配置时,环境变量应优先于推断的环境
micronaut 有什么理由在这里优先考虑 application-test.yaml 值吗?
【问题讨论】:
标签: java docker cloud integration-testing micronaut