These are very good comments from mkyong:
When Spring sees
- Jackson library is existed in the project classpath
- The
mvc:annotation-driven
is enabled - Return method annotated with @ResponseBody
Spring will handle the JSON conversion automatically.
If we see something like this:
HTTP ERROR 406
Problem accessing /kfc/kfc-kampar. Reason:Not Acceptable
Powered by Jetty://
We probably forgot the Jackson library. Or the POJO doesn't have a getter-methods.
No comments:
Post a Comment