After upgrading my Spring MVC application to Spring 3.2 I\'m getting the following exception when accessing some of my URLs:
org.springframework.web.HttpMediaTyp
I have a similar issue where rest call to the controller is having path variable which contains .au in path value. Spring is reading .au as file extention due to spring Content Negotiation
REST GET call is http://localhost:8080/api/forgot-password/kk@kudeta.com.au due to .au in path variable Spring is throwing org.springframework.web.HttpMediaTypeNotAcceptableException
We have resolved it by turning off content based negotiation
@Configuration
public class ContentNegotiationConfig extends WebMvcConfigurerAdapter{
@Override
public void configureContentNegotiation(final
ContentNegotiationConfigurer configurer) {
// Turn off suffix-based content negotiation
configurer.favorPathExtension(false);
}
}