[Spring4] @RestController and HTTP 406 Error

If you have hit upon an HTTP 406 error (“Not Acceptable”) after introducing @RestController to your code, it is probably because that the dependency to the jackson library is not correctly defined in your pom.xml. (Beware that jackson-mapper-acl is deprecated in Spring4, and replaced by jackson-core and jackson-databind.)

If the two dependencies are not added, I think the JSON conversion which is required by @RestController is not correctly done.