Why do i get whitelabel error page and how to resolve it

Whitelabel error occouring each time i hit localhost. How to resolve the error and move application further

2 answers

  • answered 2020-01-17 17:17 Mukesh Gupta

    Try application.properties file by setting the server.error.whitelabel.enabled to false.

  • answered 2020-01-17 17:36 Mayank Tripathi

    Create a controller mapping for "/error" by implementing ErrorController.

    @RestController
    public class WelcomeController implements ErrorController{
    
        private static final String PATH = "/error";
    
        @RequestMapping(value = PATH)
        public String error() {
            return "Error";
        }
    
        @Override
        public String getErrorPath() {
            return PATH;
        }
    }