Appendix A: 常见的应用属性

各种属性可以在 application.properties 文件、application.yml 文件中指定,也可以作为命令行开关。本附录提供了一个常见的 Spring Cloud Bus 属性列表,以及对消费这些属性的底层类的引用。

属性贡献可以来自你classpath上的其他jar文件,这可能不是一个详尽的列表。另外,你可以定义你自己的属性。
Name Default Description

spring.cloud.bus.ack.destination-service

Service that wants to listen to acks. By default null (meaning all services).

spring.cloud.bus.ack.enabled

true

Flag to switch off acks (default on).

spring.cloud.bus.content-type

The bus mime-type.

spring.cloud.bus.destination

Name of Spring Cloud Stream destination for messages.

spring.cloud.bus.enabled

true

Flag to indicate that the bus is enabled.

spring.cloud.bus.env.enabled

true

Flag to switch off environment change events (default on).

spring.cloud.bus.id

application

The identifier for this application instance.

spring.cloud.bus.refresh.enabled

true

Flag to switch off refresh events (default on).

spring.cloud.bus.trace.enabled

false

Flag to switch on tracing of acks (default off).