Search in sources :

Example 1 with ApplicationDiscoveryListener

use of de.codecentric.boot.admin.discovery.ApplicationDiscoveryListener in project spring-boot-admin by codecentric.

the class DiscoveryClientConfiguration method applicationDiscoveryListener.

@Bean
@ConditionalOnMissingBean
@ConfigurationProperties(prefix = "spring.boot.admin.discovery")
public ApplicationDiscoveryListener applicationDiscoveryListener(ServiceInstanceConverter serviceInstanceConverter) {
    ApplicationDiscoveryListener listener = new ApplicationDiscoveryListener(discoveryClient, registry);
    listener.setConverter(serviceInstanceConverter);
    return listener;
}
Also used : ApplicationDiscoveryListener(de.codecentric.boot.admin.discovery.ApplicationDiscoveryListener) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConfigurationProperties(org.springframework.boot.context.properties.ConfigurationProperties) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ApplicationDiscoveryListener (de.codecentric.boot.admin.discovery.ApplicationDiscoveryListener)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 ConfigurationProperties (org.springframework.boot.context.properties.ConfigurationProperties)1 Bean (org.springframework.context.annotation.Bean)1