Here is server.error.whitelabel.enabled for Spring boot disable Whitelabel Error Page. Spring boot provide Whilelabel Error Page while any error accuse in server like this:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sat Aug 05 00:02:08 IST 2017
There was an unexpected error (type=Unauthorized, status=401).
Bad credentials

Spring boot disable Whitelabel Error Page

Spring Boot provide ways to disable Whilelabel error page, write following configuration in application.properties and restart server or application.
server.error.whitelabel.enabled=false

Output:

Spring boot disable Whitelabel Error Page

Spring boot disable Whitelabel Error Page

Spring boot enable Whitelabel Error Page (default)

Spring Boot provide ways to enable Whilelabel error page, write following configuration in application.properties and restart server or application. Enable configuration is default configuration. Spring boot will enable automatically if there are no configuration has been return in application.properties file.
server.error.whitelabel.enabled=true

 Output

Spring boot enable Whitelabel Error Page

Spring boot enable Whitelabel Error Page

 

References:

Spring boot Documentation for WhilePage

 

Was this post helpful?
Let us know, if you liked the post. Only in this way, we can improve us.
Yes
No

Leave a Reply

Your email address will not be published. Required fields are marked *