使用SpringMVC的@ResponseBody返回JSON串时,碰到406错误和以下提示:
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
通常基本配置不大容易出错,在检查配置之前,先看看有没有以下两个jar包:
这俩个加入后才能正常使用。
这是jar包的链接