package org.example.seed.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by Ricardo Pina Arellano on 25/11/2016.
 */
@Configuration
@EnableWebMvc
public class APIConfig extends WebMvcConfigurerAdapter {

    @Override
    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
        configurer.favorPathExtension(true)
                .favorParameter(true)
                .ignoreAcceptHeader(false)
                .defaultContentType(MediaType.APPLICATION_JSON)
                .mediaType("xml", MediaType.APPLICATION_XML)
                .mediaType("json", MediaType.APPLICATION_JSON);
    }
}

@@ -667,46 +667,8 @@
 ue)%0A
-                .favorParameter(true)%0A
     
@@ -802,11 +802,12 @@
 pe(%22
-xml
+json
 %22, M
@@ -831,11 +831,12 @@
 ION_
-XML
+JSON
 )%0A  
@@ -853,36 +853,35 @@
     .mediaType(%22
-json
+xml
 %22, MediaType.APP
@@ -889,20 +889,19 @@
 ICATION_
-JSON
+XML
 );%0A    %7D

remove unnecessary parameter favorParameter