@@ -0,0 +1,862 @@
+package org.ngrinder.error.controller;%0A%0Aimport org.springframework.boot.web.servlet.error.ErrorController;%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0A%0Aimport static javax.servlet.RequestDispatcher.ERROR_STATUS_CODE;%0Aimport static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;%0A%0A@Controller%0Apublic class DefaultErrorController implements ErrorController %7B%0A%0A%09private static final String ERROR_HANDLING_PATH = %22/error%22;%0A%0A%09@RequestMapping(ERROR_HANDLING_PATH)%0A%09public String handleError(HttpServletRequest request) %7B%0A%09%09if (request.getAttribute(ERROR_STATUS_CODE).equals(SC_NOT_FOUND)) %7B%0A%09%09%09return %22redirect:/doError?type=404%22;%0A%09%09%7D%0A%09%09return %22redirect:/doError%22;%0A%09%7D%0A%0A%09@Override%0A%09public String getErrorPath() %7B%0A%09%09return ERROR_HANDLING_PATH;%0A%09%7D%0A%7D%0A

Add custom error controller