From 9f009e4445fce2192626bbf772109423f7f31782 Mon Sep 17 00:00:00 2001 From: Norio <59291150+norio-io@users.noreply.github.com> Date: Sun, 29 Mar 2020 18:07:38 +0900 Subject: [PATCH] Clarify loss of defaults when adding custom mapping See gh-20716 --- .../src/main/asciidoc/production-ready-features.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 21f7498e16..f29bdf6d68 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -760,6 +760,9 @@ For example, the following property maps `FATAL` to 503 (service unavailable): management.endpoint.health.status.http-mapping.fatal=503 ---- +WARNING: A custom status mapping replaces whole of the default status mappings. +That means the above example has only one mapping to `FATAL` and any other statuses will return the http status 200 as `UNKNOWN` health status. + TIP: If you need more control, you can define your own `HttpCodeStatusMapper` bean. The following table shows the default status mappings for the built-in statuses: