|
|
@ -120,7 +120,8 @@ public class WebFluxEndpointManagementContextConfiguration {
|
|
|
|
ExposableWebEndpoint health = webEndpoints.stream()
|
|
|
|
ExposableWebEndpoint health = webEndpoints.stream()
|
|
|
|
.filter((endpoint) -> endpoint.getEndpointId().equals(HealthEndpoint.ID))
|
|
|
|
.filter((endpoint) -> endpoint.getEndpointId().equals(HealthEndpoint.ID))
|
|
|
|
.findFirst()
|
|
|
|
.findFirst()
|
|
|
|
.get();
|
|
|
|
.orElseThrow(
|
|
|
|
|
|
|
|
() -> new IllegalStateException("No endpoint with id '%s' found".formatted(HealthEndpoint.ID)));
|
|
|
|
return new AdditionalHealthEndpointPathsWebFluxHandlerMapping(new EndpointMapping(""), health,
|
|
|
|
return new AdditionalHealthEndpointPathsWebFluxHandlerMapping(new EndpointMapping(""), health,
|
|
|
|
groups.getAllWithAdditionalPath(WebServerNamespace.MANAGEMENT));
|
|
|
|
groups.getAllWithAdditionalPath(WebServerNamespace.MANAGEMENT));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -162,16 +163,16 @@ public class WebFluxEndpointManagementContextConfiguration {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
|
|
|
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
|
|
|
if (bean instanceof ServerCodecConfigurer) {
|
|
|
|
if (bean instanceof ServerCodecConfigurer serverCodecConfigurer) {
|
|
|
|
process((ServerCodecConfigurer) bean);
|
|
|
|
process(serverCodecConfigurer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bean;
|
|
|
|
return bean;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void process(ServerCodecConfigurer configurer) {
|
|
|
|
private void process(ServerCodecConfigurer configurer) {
|
|
|
|
for (HttpMessageWriter<?> writer : configurer.getWriters()) {
|
|
|
|
for (HttpMessageWriter<?> writer : configurer.getWriters()) {
|
|
|
|
if (writer instanceof EncoderHttpMessageWriter) {
|
|
|
|
if (writer instanceof EncoderHttpMessageWriter<?> encoderHttpMessageWriter) {
|
|
|
|
process(((EncoderHttpMessageWriter<?>) writer).getEncoder());
|
|
|
|
process((encoderHttpMessageWriter).getEncoder());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|