diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java index 2d4732b0e5..bfc411ee15 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java @@ -171,7 +171,7 @@ public abstract class AbstractErrorWebExceptionHandler implements ErrorWebExcept } Resource resource = resolveResource(viewName); if (resource != null) { - return responseBody.bodyValue(BodyInserters.fromResource(resource)); + return responseBody.body(BodyInserters.fromResource(resource)); } return Mono.empty(); }