|
|
@@ -8,7 +8,7 @@ import org.springframework.http.converter.HttpMessageConverter;
|
|
|
import org.springframework.http.converter.StringHttpMessageConverter;
|
|
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
|
|
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
|
|
|
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
|
|
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
import java.nio.charset.Charset;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
@@ -21,7 +21,7 @@ import java.util.List;
|
|
|
**/
|
|
|
|
|
|
@Configuration
|
|
|
-public class WebConfig extends WebMvcConfigurationSupport{
|
|
|
+public class WebConfig implements WebMvcConfigurer {
|
|
|
@Bean
|
|
|
public HttpMessageConverter<String> responseBodyConverter() {
|
|
|
StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
|
|
|
@@ -40,7 +40,6 @@ public class WebConfig extends WebMvcConfigurationSupport{
|
|
|
|
|
|
@Override
|
|
|
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
|
|
- super.configureMessageConverters(converters);
|
|
|
converters.add(responseBodyConverter());
|
|
|
converters.add(MappingJacksonHttpMessageConverter());
|
|
|
}
|
|
|
@@ -50,5 +49,4 @@ public class WebConfig extends WebMvcConfigurationSupport{
|
|
|
configurer.favorPathExtension(false);
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
-
|
|
|
+}
|