Could not find acceptable representation

Posted on 2014-08-04 22:11  炫谷  阅读(27381)  评论(1编辑  收藏  举报

引起的原因: 
   由于设置了@ResponseBody,要把对象转换成json格式,缺少转换依赖的jar包,故此错。

解决办法: 

1 <dependency>
2             <groupId>org.codehaus.jackson</groupId>
3             <artifactId>jackson-core-asl</artifactId>
4         </dependency>
5         <dependency>
6             <groupId>org.codehaus.jackson</groupId>
7             <artifactId>jackson-mapper-asl</artifactId>
8         </dependency>

   加入依赖的jar,jackson-core-asl-1.9.12.jar,jackson-mapper-asl-1.9.12.jar问题解决。

 

参考博客:http://jadethao.iteye.com/blog/1926525

Copyright © 2024 炫谷
Powered by .NET 9.0 on Kubernetes