Could not find acceptable representation
引起的原因:
由于设置了@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
文章来自:http://www.cnblogs.com/enshrineZither/p/3891097.html