From 23a41aebadbe13e8992856c6be84ce6d01de0175 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 14 Jan 2023 15:42:03 +0300 Subject: Configure test coverage reports --- src/main/java/com/juick/config/WebConfig.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/com/juick/config') diff --git a/src/main/java/com/juick/config/WebConfig.java b/src/main/java/com/juick/config/WebConfig.java index 136faea9..2040afd6 100644 --- a/src/main/java/com/juick/config/WebConfig.java +++ b/src/main/java/com/juick/config/WebConfig.java @@ -35,6 +35,7 @@ import org.springframework.format.FormatterRegistry; import org.springframework.http.CacheControl; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.validation.beanvalidation.MethodValidationPostProcessor; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -66,6 +67,10 @@ public class WebConfig implements WebMvcConfigurer { public void addArgumentResolvers(List resolvers) { resolvers.add(visitorArgumentResolver()); } + @Bean + public MethodValidationPostProcessor methodValidationPostProcessor() { + return new MethodValidationPostProcessor(); + } @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { try { -- cgit v1.2.3