Bind server.error.whitelabel.enabled to ErrorProperties
Closes gh-12516
This commit is contained in:
parent
2da4897aa8
commit
161ecc0575
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue