You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2346,6 +2346,10 @@ If you have this problem, you can reorder the classpath in the IDE to place the
2346
2346
By default, Spring Boot provides an `/error` mapping that handles all errors in a sensible way, and it is registered as a "`global`" error page in the servlet container.
2347
2347
For machine clients, it produces a JSON response with details of the error, the HTTP status, and the exception message.
2348
2348
For browser clients, there is a "`whitelabel`" error view that renders the same data in HTML format (to customize it, add a `View` that resolves to `error`).
2349
+
2350
+
There are a number of `server.error` properties that can be set if you want to customize the default error handling behavior.
2351
+
See the <<appendix-application-properties.adoc#common-application-properties-server, "`Server Properties`">> section of the Appendix.
2352
+
2349
2353
To replace the default behavior completely, you can implement `ErrorController` and register a bean definition of that type or add a bean of type `ErrorAttributes` to use the existing mechanism but replace the contents.
2350
2354
2351
2355
TIP: The `BasicErrorController` can be used as a base class for a custom `ErrorController`.
0 commit comments