Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY

Fixup references following upstream Spring Framework change.
This commit is contained in:
Phillip Webb
2019-07-31 15:09:54 +01:00
parent 5926547767
commit da4f436140
17 changed files with 23 additions and 22 deletions

View File

@@ -403,8 +403,8 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
private Set<ExtensionBean> extensions = new LinkedHashSet<>();
EndpointBean(String beanName, Object bean) {
MergedAnnotation<Endpoint> annotation = MergedAnnotations.from(bean.getClass(), SearchStrategy.EXHAUSTIVE)
.get(Endpoint.class);
MergedAnnotation<Endpoint> annotation = MergedAnnotations
.from(bean.getClass(), SearchStrategy.TYPE_HIERARCHY).get(Endpoint.class);
String id = annotation.getString("id");
Assert.state(StringUtils.hasText(id),
() -> "No @Endpoint id attribute specified for " + bean.getClass().getName());
@@ -470,7 +470,7 @@ public abstract class EndpointDiscoverer<E extends ExposableEndpoint<O>, O exten
.get(EndpointExtension.class);
Class<?> endpointType = extensionAnnotation.getClass("endpoint");
MergedAnnotation<Endpoint> endpointAnnotation = MergedAnnotations
.from(endpointType, SearchStrategy.EXHAUSTIVE).get(Endpoint.class);
.from(endpointType, SearchStrategy.TYPE_HIERARCHY).get(Endpoint.class);
Assert.state(endpointAnnotation.isPresent(),
() -> "Extension " + endpointType.getName() + " does not specify an endpoint");
this.endpointId = EndpointId.of(endpointAnnotation.getString("id"));

View File

@@ -153,7 +153,7 @@ class WebEndpointTestInvocationContextProvider implements TestTemplateInvocation
}
private boolean isConfiguration(Class<?> candidate) {
return MergedAnnotations.from(candidate, SearchStrategy.EXHAUSTIVE).isPresent(Configuration.class);
return MergedAnnotations.from(candidate, SearchStrategy.TYPE_HIERARCHY).isPresent(Configuration.class);
}
@Override