In traditional Spring MVC, I can extend WebMvcConfigurationSupport
and do the following:
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false).
favorParameter(true).
defaultContentType(MediaType.APPLICATION_JSON).
mediaType("xml", MediaType.APPLICATION_XML);
}
How do I do this in a Spring Boot app? My understanding is that adding a WebMvcConfigurationSupport
with @EnableWebMvc
will disable the Spring Boot WebMvc autoconfigure, which I don't want.