use of org.springframework.boot.actuate.endpoint.annotation.EndpointExtension in project spring-boot by spring-projects.
the class OnAvailableEndpointCondition method getEndpointAnnotation.
protected MergedAnnotation<Endpoint> getEndpointAnnotation(Class<?> target) {
MergedAnnotations annotations = MergedAnnotations.from(target, SearchStrategy.TYPE_HIERARCHY);
MergedAnnotation<Endpoint> endpoint = annotations.get(Endpoint.class);
if (endpoint.isPresent()) {
return endpoint;
}
MergedAnnotation<EndpointExtension> extension = annotations.get(EndpointExtension.class);
Assert.state(extension.isPresent(), "No endpoint is specified and the return type of the @Bean method is " + "neither an @Endpoint, nor an @EndpointExtension");
return getEndpointAnnotation(extension.getClass("endpoint"));
}
Aggregations