SpringMVC中使用@ResponseBody返回对象,出现406
The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.错误
解决办法是在springmvc的配置文件中加入:
<mvc:annotation-driven></mvc:annotation-driven>
这样就解决了。