org.springframework.web.HttpMediaTypeNotAcceptableException | Could not find acceptable representation:
Full Error details:
[plain]
{“timestamp”:1522250376646,”status”:406,”error”:”Not Acceptable”,”exception”:”org.springframework.web.HttpMediaTypeNotAcceptableException”,”message”:”Could not find acceptable representation”,”path”:”/category/deleteImage/google.png”}
[/plain]
As per this link, I found the solution for this issue:
Solution:
[java]
@SpringBootApplication
public class CouponzcornerBackendApplication {
public static void main(String[] args) {
SpringApplication.run(CouponzcornerBackendApplication.class, args);
}
@Configuration
public static class PathMatchingConfigurationAdapter extends WebMvcConfigurerAdapter {
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
}
}
[/java]