This error can be solve by these tricks .
1. use @EnableWebMvc with spring 4.0 or above.
@Controller
@EnableWebMvc
@RequestMapping(value = "/articles/action", produces="application/json")
public class UserController {
}
2. use produces="application/json" in @RequestMapping
3. add these dependency or jar if missing
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.2.3</version>
</dependency>
1. use @EnableWebMvc with spring 4.0 or above.
@Controller
@EnableWebMvc
@RequestMapping(value = "/articles/action", produces="application/json")
public class UserController {
}
2. use produces="application/json" in @RequestMapping
3. add these dependency or jar if missing
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.2.3</version>
</dependency>
Superb i really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.
ReplyDeleteSAP training in Chennai
First is to thank you for all this informative posts you give us for free; i bet all of us are happy.
ReplyDeleteSuch a great idea of yours! You have been a big help for me. Thanks a lot. more post for interesting topic. Great!
SAP training in Chennai
Everything is fine, am happy about your blog. Thanks admin for sharing the unique content, you have done a great job I appreciate your effort and I hope you will get more positive comments from the web users.
ReplyDeleteSAP training in Chennai
funny video watch Funny Videos
ReplyDelete