使用 Bootstrap 覆蓋屬性
如果您啟用 config first bootstrap,您可以透過在應用程式的配置中放置兩個屬性來讓客戶端設定覆蓋來自 Config Server 的配置,這些屬性位於 Config Server 使用的外部環境儲存庫(例如,Git、Vault、SVN 等)中。
spring.cloud.config.allowOverride=true
spring.cloud.config.overrideNone=true
啟用 Bootstrap 並將這兩個屬性設定為 true 後,您將能夠在客戶端應用程式配置中覆蓋來自 Config Server 的配置。