1 package de.juplo.thymeproxy;
4 import javax.servlet.http.HttpServletRequest;
5 import org.springframework.http.HttpStatus;
6 import org.springframework.web.bind.annotation.ControllerAdvice;
7 import org.springframework.web.bind.annotation.ExceptionHandler;
8 import org.springframework.web.bind.annotation.ResponseStatus;
9 import org.springframework.web.servlet.ModelAndView;
10 import org.thymeleaf.exceptions.TemplateInputException;
19 public class DefaultExceptionHandler
21 public DefaultExceptionHandler()
26 @ResponseStatus(HttpStatus.NOT_FOUND)
27 @ExceptionHandler(value = TemplateInputException.class)
28 public ModelAndView templateInputExceptionHandler(
29 HttpServletRequest request,
30 TemplateInputException e
33 ModelAndView mav = new ModelAndView("templates/404");
34 mav.addObject("template", e.getTemplateName());
35 mav.addObject("uri", request.getRequestURI());