- @GetMapping
- public String handleError(HttpServletRequest request) {
- ServletWebRequest servletWebRequest = new ServletWebRequest(request);
- Throwable t = errorAttributes.getError(servletWebRequest);
- if (t != null)
- logger.warn("handleError", t);
- Map<String, Object> attributes = errorAttributes.getErrorAttributes(servletWebRequest, true);
- attributes.forEach((attribute, value) -> {
- logger.warn("handleError: {} -> {}", attribute, value);
- });
- // Return the name of the page INCLUDING suffix, which I guess is a "view" name.
- // Just "error" is not enough, but don't seem to need a ModelAndView object.
- return "error.html";
- }
+ @GetMapping
+ public String handleError(HttpServletRequest request) {
+ ServletWebRequest servletWebRequest = new ServletWebRequest(request);
+ Throwable t = errorAttributes.getError(servletWebRequest);
+ if (t != null)
+ logger.warn("handleError", t);
+ Map<String, Object> attributes = errorAttributes.getErrorAttributes(servletWebRequest, true);
+ attributes.forEach((attribute, value) -> logger.warn("handleError: {} -> {}", attribute, value));
+ // Return the name of the page INCLUDING suffix, which I guess is a "view" name.
+ // Just "error" is not enough, but don't seem to need a ModelAndView object.
+ return "error.html";
+ }