add support for HasFeatures

This commit is contained in:
Spencer Gibb
2015-09-25 16:08:37 -06:00
parent 0a2d1703f7
commit 7cf0fa4824
14 changed files with 89 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.actuator.HasFeatures;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EurekaServerConfigBean;
import org.springframework.context.annotation.Bean;
@@ -67,6 +68,11 @@ public class EurekaServerConfiguration extends WebMvcConfigurerAdapter {
@Autowired
private ApplicationInfoManager applicationInfoManager;
@Bean
public HasFeatures eurekaServerFeature() {
return HasFeatures.namedFeature("Eureka Server", EurekaServerConfiguration.class);
}
@Bean
@ConditionalOnProperty(prefix = "eureka.dashboard", name = "enabled", matchIfMissing = true)
public EurekaController eurekaController() {