Spring Cloud Config配置文件是硬编码还是特殊的?

时间:2017-06-20 21:56:07

标签: jhipster spring-cloud-config

我通过JHipster微服务应用程序开始使用Spring Cloud Config。我看到dev和prod的默认配置文件。我真的希望为每个客户提供多个开发配置文件。例如devCustomer1,devCustomer2,多个测试配置文件:testCustomer1,testCustomer2和多个生产配置文件:prodCustomer1,prodCustomer2 ......

(每个客户都需要单独的数据库和自定义)

我可以重命名配置文件并让它从git repo中读取数据,以便重命名dev / test / prod,还是“dev”和“prod”特殊关键字,不能更改?

1 个答案:

答案 0 :(得分:1)

这绝不是硬编码,您可以使用应用spring.cloud.config.profile属性覆盖配置文件列表。

请参阅:Layouts of my activities