org.springframework.web.HttpMediaTypeNotAcceptableException | Could not find acceptable representation

org.springframework.web.HttpMediaTypeNotAcceptableException | Could not find acceptable representation:

Full Error details:


{"timestamp":1522250376646,"status":406,"error":"Not Acceptable","exception":"org.springframework.web.HttpMediaTypeNotAcceptableException","message":"Could not find acceptable representation","path":"/category/deleteImage/google.png"}

 

 

As per this link, I found the solution for this issue:

 

Solution:


@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);
}
}

}

240 total views, 4 views today

Leave a Reply

Your email address will not be published. Required fields are marked *