使用配置檔案覆蓋屬性

覆蓋來自配置伺服器的屬性的最後一種方法是在客戶端應用程式中指定 profile 特定的配置檔案中的屬性。

例如,如果您有來自配置伺服器的以下配置:

hello="Hello From Config Server!"

您可以透過在 profile 特定的配置檔案中設定 hello 並啟用該 profile 來覆蓋客戶端應用程式中 hello 的值。

application-overrides.properties
hello="Hello From Application!"

在上面的示例中,您需要啟用 overrides profile。

© . This site is unofficial and not affiliated with VMware.