From 89642f0ce840b3d01c8b9d623d4e52e6f16cbd07 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 8 Dec 2020 14:48:17 -0800 Subject: [PATCH] Add link to appendix from error handling Improve documentation by adding a link from the "Error Handling" section to the appendix. Closes gh-24265 --- .../appendix-application-properties.adoc | 64 ++++++++++++++----- .../main/asciidoc/spring-boot-features.adoc | 4 ++ 2 files changed, 51 insertions(+), 17 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 4833f5652bad..c43771b1f886 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -14,66 +14,96 @@ Also, you can define your own properties. -== Core properties - +[[common-application-properties-core]] +== Core properties [[core-properties]] include::{generated-resources-root}/config-docs/core.adoc[] -== Cache properties + +[[common-application-properties-cache]] +== Cache properties [[cache-properties]] include::{generated-resources-root}/config-docs/cache.adoc[] -== Mail properties + +[[common-application-properties-mail]] +== Mail properties [[mail-properties]] include::{generated-resources-root}/config-docs/mail.adoc[] -== JSON properties + +[[common-application-properties-json]] +== JSON properties [[json-properties]] include::{generated-resources-root}/config-docs/json.adoc[] -== Data properties + +[[common-application-properties-data]] +== Data properties [[data-properties]] include::{generated-resources-root}/config-docs/data.adoc[] -== Transaction properties + +[[common-application-properties-transaction]] +== Transaction properties [[transaction-properties]] include::{generated-resources-root}/config-docs/transaction.adoc[] -== Data migration properties + +[[common-application-properties-data-migration]] +== Data migration properties [[data-migration-properties]] include::{generated-resources-root}/config-docs/data-migration.adoc[] -== Integration properties + +[[common-application-properties-integration]] +== Integration properties [[integration-properties]] include::{generated-resources-root}/config-docs/integration.adoc[] -== Web properties + +[[common-application-properties-web]] +== Web properties [[web-properties]] include::{generated-resources-root}/config-docs/web.adoc[] -== Templating properties + +[[common-application-properties-templating]] +== Templating properties [[templating-properties]] include::{generated-resources-root}/config-docs/templating.adoc[] -== Server properties + +[[common-application-properties-server]] +== Server properties [[server-properties]] include::{generated-resources-root}/config-docs/server.adoc[] -== Security properties + +[[common-application-properties-security]] +== Security properties [[security-properties]] include::{generated-resources-root}/config-docs/security.adoc[] -== RSocket properties + +[[common-application-properties-rsocket]] +== RSocket properties [[rsocket-properties]] include::{generated-resources-root}/config-docs/rsocket.adoc[] -== Actuator properties + +[[common-application-properties-actuator]] +== Actuator properties [[actuator-properties]] include::{generated-resources-root}/config-docs/actuator.adoc[] -== Devtools properties + +[[common-application-properties-devtools]] +== Devtools properties [[devtools-properties]] include::{generated-resources-root}/config-docs/devtools.adoc[] -== Testing properties + +[[common-application-properties-testing]] +== Testing properties [[testing-properties]] include::{generated-resources-root}/config-docs/testing.adoc[] diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 18988385b963..51d3b72fc2d1 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2346,6 +2346,10 @@ If you have this problem, you can reorder the classpath in the IDE to place the 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. For machine clients, it produces a JSON response with details of the error, the HTTP status, and the exception message. 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`). + +There are a number of `server.error` properties that can be set if you want to customize the default error handling behavior. +See the <> section of the Appendix. + 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. TIP: The `BasicErrorController` can be used as a base class for a custom `ErrorController`.