Merge branch '3.0.x'

Closes gh-34706
This commit is contained in:
Scott Frederick 2023-03-21 15:06:58 -05:00
commit 80403b2ea8
1 changed files with 3 additions and 2 deletions

View File

@ -159,9 +159,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 a file 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.
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: