Uses annotation to check if endpoint is enabled.

fixes gh-131
This commit is contained in:
Spencer Gibb
2018-11-19 13:00:18 -05:00
parent fce71a4f15
commit 49cda47bf1

View File

@@ -189,9 +189,9 @@ public class BusAutoConfiguration implements ApplicationEventPublisherAware {
@Configuration
@ConditionalOnBean(ContextRefresher.class)
@ConditionalOnProperty(value = "endpoints.spring.cloud.bus.refresh.enabled", matchIfMissing = true)
protected static class BusRefreshEndpointConfiguration {
@Bean
@ConditionalOnEnabledEndpoint
public RefreshBusEndpoint refreshBusEndpoint(ApplicationContext context,
BusProperties bus) {
return new RefreshBusEndpoint(context, bus.getId());