From 8e5160fcb39c90c83bcda58f1070d07a3dea498d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 5 Sep 2017 16:14:47 +0300 Subject: api: fix configuration --- .../juick/server/configuration/BaseWebConfiguration.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'juick-server-web/src/main') diff --git a/juick-server-web/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java b/juick-server-web/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java index 7fdaca14..c0bd8b14 100644 --- a/juick-server-web/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java +++ b/juick-server-web/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java @@ -26,8 +26,8 @@ import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.commons.CommonsMultipartResolver; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; -import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; +import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import java.util.List; @@ -35,17 +35,16 @@ import java.util.List; * Created by vitalyster on 28.06.2016. */ @Configuration -public class BaseWebConfiguration extends WebMvcConfigurationSupport { +public class BaseWebConfiguration extends WebMvcConfigurerAdapter { + @Override - public RequestMappingHandlerMapping requestMappingHandlerMapping() { - RequestMappingHandlerMapping mapping = super.requestMappingHandlerMapping(); - mapping.setUseSuffixPatternMatch(false); - return mapping; + public void configurePathMatch(PathMatchConfigurer configurer) { + configurer.setUseSuffixPatternMatch(false); } @Override - protected void configureMessageConverters(List> converters) { + public void configureMessageConverters(List> converters) { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(jsonMapper()); converters.add(converter); super.configureMessageConverters(converters); -- cgit v1.2.3