diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.java
index ab76336bad9..2df153332ee 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfiguration.java
@@ -225,7 +225,7 @@ public class ErrorMvcAutoConfiguration {
response.setContentType(getContentType());
}
builder.append("
Whitelabel Error Page
").append(
- "This application has no configured error view, so you are seeing this as a fallback.
")
+ "This application has no explicit mapping for /error, so you are seeing this as a fallback.
")
.append("").append(timestamp).append("
")
.append("There was an unexpected error (type=")
.append(htmlEscape(model.get("error"))).append(", status=")
diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java
index 19c6fd7dc95..60efbc76bf3 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/error/ErrorMvcAutoConfigurationTests.java
@@ -58,7 +58,9 @@ public class ErrorMvcAutoConfigurationTests {
webRequest.getRequest(), webRequest.getResponse());
String responseString = ((MockHttpServletResponse) webRequest.getResponse())
.getContentAsString();
- assertThat(responseString).contains("
Exception message
")
+ assertThat(responseString).contains(
+ "
This application has no explicit mapping for /error, so you are seeing this as a fallback.
")
+ .contains("
Exception message
")
.contains("
java.lang.IllegalStateException");
});
}
diff --git a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java
index 689c78f2c97..8d5bf86e0f9 100644
--- a/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java
+++ b/spring-boot-samples/spring-boot-sample-actuator/src/test/java/sample/actuator/SampleActuatorApplicationTests.java
@@ -161,8 +161,7 @@ public class SampleActuatorApplicationTests {
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
String body = entity.getBody();
assertThat(body).as("Body was null").isNotNull();
- assertThat(body).contains(
- "This application has no configured error view, so you are seeing this as a fallback.");
+ assertThat(body).contains("This application has no explicit mapping for /error");
}
@Test