From 67ae14e8d41e0e34a0271b4e9a37f6a729eb851a Mon Sep 17 00:00:00 2001 From: RoshanThomas Date: Sun, 13 Mar 2016 20:29:38 -0400 Subject: [PATCH] Removing HTML media type --- .../spring/web/config/ContentManagementWebConfig.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java b/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java index 6fd68394ea..2c5b423029 100644 --- a/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java +++ b/spring-mvc-java/src/main/java/org/baeldung/spring/web/config/ContentManagementWebConfig.java @@ -23,14 +23,13 @@ public class ContentManagementWebConfig extends WebMvcConfigurerAdapter { @Override public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) { - configurer.favorPathExtension(true). - favorParameter(false). + configurer.favorPathExtension(false). + favorParameter(true). parameterName("mediaType"). ignoreAcceptHeader(true). useJaf(false). - defaultContentType(MediaType.TEXT_HTML). + defaultContentType(MediaType.APPLICATION_JSON). mediaType("xml", MediaType.APPLICATION_XML). - mediaType("html", MediaType.TEXT_HTML). mediaType("json", MediaType.APPLICATION_JSON); }