Could not find acceptable representation

引發的緣由: 
   因爲設置了@ResponseBody,要把對象轉換成json格式,缺乏轉換依賴的jar包,故此錯。json

解決辦法: app

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問題解決。spa

 

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

相關文章
相關標籤/搜索