aboutsummaryrefslogtreecommitdiff
path: root/juick-server-web
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-09-05 16:14:47 +0300
committerGravatar Vitaly Takmazov2017-09-05 16:14:47 +0300
commit8e5160fcb39c90c83bcda58f1070d07a3dea498d (patch)
tree6d740478e9a1d1488581122ae990d18f1cf40ffe /juick-server-web
parent75f208e86735d14de1ea5b74c5018d6ca29ee40a (diff)
api: fix configuration
Diffstat (limited to 'juick-server-web')
-rw-r--r--juick-server-web/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java15
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);