From 22713c1dd38e87591230b5b03d8fd6abb33e8cf1 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 18 Jun 2016 23:43:10 +0200 Subject: [PATCH] WIP: welcom + error - 404 anstatt 500 --- src/main/java/de/juplo/thymeproxy/Application.java | 4 ++-- .../{ExceptionMappings.java => DefaultExceptionHandler.java} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename src/main/java/de/juplo/thymeproxy/{ExceptionMappings.java => DefaultExceptionHandler.java} (91%) diff --git a/src/main/java/de/juplo/thymeproxy/Application.java b/src/main/java/de/juplo/thymeproxy/Application.java index 7eb7333..48bea7d 100644 --- a/src/main/java/de/juplo/thymeproxy/Application.java +++ b/src/main/java/de/juplo/thymeproxy/Application.java @@ -118,9 +118,9 @@ public class Application extends WebMvcConfigurerAdapter } @Bean - public ExceptionMappings exceptionMappings() + public DefaultExceptionHandler defaultExceptionHandler() { - return new ExceptionMappings(); + return new DefaultExceptionHandler(); } diff --git a/src/main/java/de/juplo/thymeproxy/ExceptionMappings.java b/src/main/java/de/juplo/thymeproxy/DefaultExceptionHandler.java similarity index 91% rename from src/main/java/de/juplo/thymeproxy/ExceptionMappings.java rename to src/main/java/de/juplo/thymeproxy/DefaultExceptionHandler.java index a265e3f..6fb89b5 100644 --- a/src/main/java/de/juplo/thymeproxy/ExceptionMappings.java +++ b/src/main/java/de/juplo/thymeproxy/DefaultExceptionHandler.java @@ -16,9 +16,9 @@ import org.thymeleaf.exceptions.TemplateInputException; * @author Kai Moritz */ @ControllerAdvice -public class ExceptionMappings +public class DefaultExceptionHandler { - @ResponseStatus(HttpStatus.NOT_FOUND) + @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler(value = TemplateInputException.class) public ModelAndView templateInputExceptionHandler( HttpServletRequest request, -- 2.20.1