Class MyErrorController

  • All Implemented Interfaces:
    org.springframework.boot.web.servlet.error.ErrorController

    @Controller
    public class MyErrorController
    extends java.lang.Object
    implements org.springframework.boot.web.servlet.error.ErrorController
    Controller to handle invalid HTTP requests
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String handleError​(javax.servlet.http.HttpServletRequest request)
      Request handler for invalid HTTP requests
      Returns the correct error page depending on what the error is
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MyErrorController

        public MyErrorController()
    • Method Detail

      • handleError

        @RequestMapping("/error")
        public java.lang.String handleError​(javax.servlet.http.HttpServletRequest request)
        Request handler for invalid HTTP requests
        Returns the correct error page depending on what the error is
        Parameters:
        request - faulty HTTP request
        Returns:
        appropriate error page