简体   繁体   English

Spring Cloud Config分支与配置文件

[英]Spring cloud config Branch vs Profiles

We have started using spring-cloud-config to manage the configuration of our microservices. 我们已经开始使用spring-cloud-config来管理我们的微服务的配置。

We have DEV, INT, QA and PROD stages. 我们有DEV,INT,QA和PROD阶段。 What would be the better way to manage the configuration specific to stages? 什么是管理特定于阶段的配置的更好方法?

  • Using branches or 使用分支或
  • Using profiles 使用个人资料

Having it as the separate branch will be cleaner as configuration will not be cluttered in one place (my view). 将其作为单独的分支将更加整洁,因为配置不会在一个地方混乱(我认为)。 Any recommendations? 有什么建议吗?

I have chose using Branch because of the following advantages 我选择使用Branch是因为以下优点

  • Easier to manage the config 易于管理配置
  • Configuration files will be smaller as there will be config for each environment 配置文件将更小,因为每种环境都有配置
  • As spencergibb suggested, you wont change the production config if it is in the different branch 正如spencergibb所建议的那样,如果生产配置位于其他分支中,则不会更改它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spring Cloud配置中的spring.profiles.include属性 - spring.profiles.include property from spring cloud config 从Spring Cloud Config Server获取配置时,Spring配置文件无法正确排序 - Spring profiles not ordering correctly when obtaining config from Spring Cloud Config Server Spring Cloud Config Server仅从Master分支读取 - spring cloud config server reading only from master branch SpringBoot 配置文件与 Gradle 与云 - SpringBoot profiles with Gradle vs cloud 使用 Spring Cloud Config 进行配置 - Config with Spring Cloud Config 如何使用带有 postgresql 和 jdbc 的 Spring Cloud 配置服务器作为具有多个配置文件的后端? - How to use spring cloud config server with postgresql and jdbc as backend with multiple profiles? 您如何在引导文件中正确设置不同的 Spring 配置文件(用于 Spring Boot 以针对不同的云配置服务器)? - How do you properly set different Spring profiles in bootstrap file (for Spring Boot to target different Cloud Config Servers)? Spring Cloud本地与远程Config Server配置 - Spring Cloud local vs remote Config Server configuration Spring cloud config searchPaths vs repo 目录结构 - Spring cloud config searchPaths vs repo directory structure Spring启动YAML配置用于配置文件的组合 - Spring boot YAML config for combinations of profiles
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM