@ -1348,7 +1348,7 @@ in the ``Production-ready features'' section.
@@ -1348,7 +1348,7 @@ in the ``Production-ready features'' section.
[[howto-customize-the-whitelabel-error-page]]
=== Customize the ``whitelabel'' error page
The Actuator installs a ``whitelabel'' error page that you will see in browser client if
Spring Boot installs a ``whitelabel'' error page that you will see in browser client if
you encounter a server error (machine clients consuming JSON and other media types should
see a sensible response with the right error code). To switch it off you can set
`error.whitelabel.enabled=false`, but normally in addition or alternatively to that you
@ -1361,6 +1361,8 @@ of the default configuration you should find a `BeanNameViewResolver` in your
@@ -1361,6 +1361,8 @@ of the default configuration you should find a `BeanNameViewResolver` in your
`ApplicationContext` so a `@Bean` with id `error` would be a simple way of doing that.
Look at {sc-spring-boot-autoconfigure}/web/ErrorMvcAutoConfiguration.{sc-ext}[`ErrorMvcAutoConfiguration`] for more options.
See also the section on <<boot-features-error-handling, Error Handling>> for details of
how to register handlers in the servlet container.
@ -1001,6 +1001,24 @@ You can also use regular Spring MVC features like http://docs.spring.io/spring/d
@@ -1001,6 +1001,24 @@ You can also use regular Spring MVC features like http://docs.spring.io/spring/d
methods] and http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/#mvc-ann-controller-advice[`@ControllerAdvice`].
The `ErrorController` will then pick up any unhandled exceptions.
N.B. if you register an `ErrorPage` with a path that will end up being handled by a `Filter` (e.g. as is common with some non-Spring web frameworks,
like Jersey and Wicket), then the `Filter` has to be explicitly registered as an `ERROR` dispatcher, e.g.