Search in sources :

Example 1 with InstanceWebClient

use of de.codecentric.boot.admin.server.web.client.InstanceWebClient in project spring-boot-admin by codecentric.

the class AdminServerAutoConfiguration method endpointDetector.

@Bean
@ConditionalOnMissingBean
public EndpointDetector endpointDetector(InstanceRepository instanceRepository, InstanceWebClient.Builder instanceWebClientBuilder) {
    InstanceWebClient instanceWebClient = instanceWebClientBuilder.build();
    ChainingStrategy strategy = new ChainingStrategy(new QueryIndexEndpointStrategy(instanceWebClient), new ProbeEndpointsStrategy(instanceWebClient, this.adminServerProperties.getProbedEndpoints()));
    return new EndpointDetector(instanceRepository, strategy);
}
Also used : QueryIndexEndpointStrategy(de.codecentric.boot.admin.server.services.endpoints.QueryIndexEndpointStrategy) EndpointDetector(de.codecentric.boot.admin.server.services.EndpointDetector) ChainingStrategy(de.codecentric.boot.admin.server.services.endpoints.ChainingStrategy) ProbeEndpointsStrategy(de.codecentric.boot.admin.server.services.endpoints.ProbeEndpointsStrategy) InstanceWebClient(de.codecentric.boot.admin.server.web.client.InstanceWebClient) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

EndpointDetector (de.codecentric.boot.admin.server.services.EndpointDetector)1 ChainingStrategy (de.codecentric.boot.admin.server.services.endpoints.ChainingStrategy)1 ProbeEndpointsStrategy (de.codecentric.boot.admin.server.services.endpoints.ProbeEndpointsStrategy)1 QueryIndexEndpointStrategy (de.codecentric.boot.admin.server.services.endpoints.QueryIndexEndpointStrategy)1 InstanceWebClient (de.codecentric.boot.admin.server.web.client.InstanceWebClient)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1