Register composed annotations explicitly

Closes gh-31919
pull/31928/head
Stephane Nicoll 2 years ago
parent 0e9f8a5994
commit db0e008c01

@ -26,7 +26,6 @@ import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.EndpointExtension; import org.springframework.boot.actuate.endpoint.annotation.EndpointExtension;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation; import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation; import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
import org.springframework.core.annotation.SynthesizedAnnotation;
/** /**
* {@link RuntimeHintsRegistrar} for actuator support. * {@link RuntimeHintsRegistrar} for actuator support.
@ -37,11 +36,10 @@ class ActuatorAnnotationsRuntimeHints implements RuntimeHintsRegistrar {
@Override @Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) { public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
Stream.of(Endpoint.class, ReadOperation.class, WriteOperation.class, DeleteOperation.class, Stream.of(ReadOperation.class, WriteOperation.class, DeleteOperation.class)
EndpointExtension.class)
.forEach((annotationType) -> RuntimeHintsUtils.registerAnnotation(hints, annotationType)); .forEach((annotationType) -> RuntimeHintsUtils.registerAnnotation(hints, annotationType));
Stream.of(Endpoint.class, EndpointExtension.class).forEach( Stream.of(Endpoint.class, EndpointExtension.class)
(annotationType) -> hints.proxies().registerJdkProxy(annotationType, SynthesizedAnnotation.class)); .forEach((annotationType) -> RuntimeHintsUtils.registerComposableAnnotation(hints, annotationType));
} }
} }

Loading…
Cancel
Save