diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorProperties.java index f1dda27e7b7..f210e54563e 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ErrorProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,8 @@ public class ErrorProperties { */ private IncludeStacktrace includeStacktrace = IncludeStacktrace.NEVER; + private Whitelabel whitelabel = new Whitelabel(); + public String getPath() { return this.path; } @@ -68,6 +70,14 @@ public class ErrorProperties { this.includeStacktrace = includeStacktrace; } + public Whitelabel getWhitelabel() { + return this.whitelabel; + } + + public void setWhitelabel(Whitelabel whitelabel) { + this.whitelabel = whitelabel; + } + /** * Include Stacktrace attribute options. */ @@ -90,4 +100,20 @@ public class ErrorProperties { } + public static class Whitelabel { + + /** + * Whether to enable the default error page displayed in browsers in case of a server error. + */ + private boolean enabled = true; + + public boolean isEnabled() { + return this.enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + } + } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 8a2016a6af9..abb05934e2d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -29,16 +29,6 @@ "level": "error" } }, - { - "name": "server.error.include-stacktrace", - "defaultValue": "never" - }, - { - "name": "server.error.whitelabel.enabled", - "type": "java.lang.Boolean", - "description": "Whether to enable the default error page displayed in browsers in case of a server error.", - "defaultValue": true - }, { "name": "server.port", "defaultValue": 8080