Using Bootstrap To Override Properties
如果您启用 config first bootstrap,您可以通过在应用程序配置中放置两个属性,但它们驻留在 config server 使用的外部环境存储库中(例如,Git、Vault、SVN 等),来让客户端设置覆盖来自 config server 的配置。
If you enable config first bootstrap, you can let client settings override configuration from the config server by placing two properties within the application’s configuration that reside in the external environment repository (for example, Git, Vault, SVN, and others) used by the config server.
spring.cloud.config.allowOverride=true
spring.cloud.config.overrideNone=true
在启用 Bootstrap 并且这两个属性都设置为 true 的情况下,你将能够在客户端应用程序配置中覆盖来自 config server 的配置。
With Bootstrap enabled and these two properties set to true you will be able to override configuration from the config server within the clients application configuration.