Springmvc返回json

来源:互联网 发布:外文电子图书数据库有 编辑:程序博客网 时间:2024/04/26 23:27

出现个错误:The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.

原因很简单tomcat的lib下忘了加Jackson包了。。。另外springmvc的配置文件里要加上<mvc:default-servlet-handler/><mvc:annotation-driven/>这两句配置

0 0
原创粉丝点击