From 1c05ad2852a8810d11ceff386f171b7368908950 Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Tue, 21 Mar 2023 14:45:20 -0500 Subject: [PATCH] Polish "Clarify conventions for custom error pages in WebFlux" See gh-34534 --- .../spring-boot-docs/src/docs/asciidoc/web/reactive.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc index 85ce6f11f290..8aaaed7f9b9d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc @@ -141,10 +141,10 @@ include::code:MyExceptionHandlingController[] [[web.reactive.webflux.error-handling.error-pages]] ===== Custom Error Pages -If you want to display a custom HTML error page for a given status code, you can add views that resolve from "error/*", for example by adding files to an `/error` directory. +If you want to display a custom HTML error page for a given status code, you can add views that resolve from `error/*`, for example by adding files to a `/error` directory. Error pages can either be static HTML (that is, added under any of the static resource directories) or built with templates. -The name of the file should be the exact status code or a series mask, or "error" for a fallback if nothing else matches. -Note the difference with MVC where "error" is the name of the default error `View`, whereas here it is "error/error". +The name of the file should be the exact status code, a status code series mask, or `error` for a default if nothing else matches. +Note that the path to the default error view is `error/error`, whereas with Spring MVC the default error view is `error`. For example, to map `404` to a static HTML file, your directory structure would be as follows: