Am creating a simple REST service using Springframework with Tomcat. The response should have to be in json like {\"id\":\"101\",\"name\":\"Ram\"} .When ever I run, am getti
Your cause is
nested exception is java.lang.ClassCastException: org.springframework.web.accept.ContentNegotiationManagerFactoryBean$$EnhancerByCGLIB$$88a811cb cannot be cast to org.springframework.web.accept.ContentNegotiationManager
This is probably due to both
and @EnableWebMvc
are used together. As they are not complementary, either use @EnableWebMvc
with Java based config or
with xml.