diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java index ff1a2fb593a..23783f5abbf 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java @@ -202,8 +202,8 @@ public class WebFluxEndpointHandlerMapping extends RequestMappingInfoHandlerMapp this.operationInvoker = operationInvoker; } - @SuppressWarnings({ "unchecked", "rawtypes" }) - Publisher> doHandle(ServerWebExchange exchange, + @SuppressWarnings({ "unchecked" }) + Publisher> doHandle(ServerWebExchange exchange, Map body) { Map arguments = new HashMap<>((Map) exchange .getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE)); @@ -212,8 +212,7 @@ public class WebFluxEndpointHandlerMapping extends RequestMappingInfoHandlerMapp } exchange.getRequest().getQueryParams().forEach((name, values) -> arguments .put(name, values.size() == 1 ? values.get(0) : values)); - return (Publisher) handleResult( - (Publisher) this.operationInvoker.invoke(arguments), + return handleResult((Publisher) this.operationInvoker.invoke(arguments), exchange.getRequest().getMethod()); } @@ -247,7 +246,7 @@ public class WebFluxEndpointHandlerMapping extends RequestMappingInfoHandlerMapp } @ResponseBody - public Publisher> handle(ServerWebExchange exchange, + public Publisher> handle(ServerWebExchange exchange, @RequestBody(required = false) Map body) { return doHandle(exchange, body); } @@ -264,7 +263,7 @@ public class WebFluxEndpointHandlerMapping extends RequestMappingInfoHandlerMapp } @ResponseBody - public Publisher> handle(ServerWebExchange exchange) { + public Publisher> handle(ServerWebExchange exchange) { return doHandle(exchange, null); }