diff options
Diffstat (limited to 'juick-server-web/src/main')
-rw-r--r-- | juick-server-web/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java | 15 |
1 files changed, 7 insertions, 8 deletions
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<HttpMessageConverter<?>> converters) { + public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(jsonMapper()); converters.add(converter); super.configureMessageConverters(converters); |