常用應用程式屬性

各種屬性可以在您的 application.properties 檔案、application.yml 檔案或作為命令列開關來指定。本附錄提供常見 Spring Cloud Bus 屬性的清單,以及對使用它們的底層類別的參考。

屬性貢獻可能來自您類別路徑上的其他 jar 檔案,因此您不應將此視為詳盡的清單。此外,您可以定義自己的屬性。
名稱 預設值 描述

spring.cloud.bus.ack.destination-service

想要監聽 ack 的服務。預設為 null(表示所有服務)。

spring.cloud.bus.ack.enabled

true

關閉 acks 的旗標(預設為開啟)。

spring.cloud.bus.content-type

Bus 的 mime 類型。

spring.cloud.bus.destination

訊息的 Spring Cloud Stream 目的地名稱。

spring.cloud.bus.enabled

true

指示 Bus 是否啟用的旗標。

spring.cloud.bus.env.enabled

true

關閉環境變更事件的旗標(預設為開啟)。

spring.cloud.bus.id

application

此應用程式實例的識別符。

spring.cloud.bus.refresh.enabled

true

關閉重新整理事件的旗標(預設為開啟)。

spring.cloud.bus.trace.enabled

false

開啟 acks 追蹤的旗標(預設為關閉)。