接口正常执行,返回给前端后报服务器500异常,异常详情:

org.springframework.http.converter.HttpMessageNotWritableException: No converter found for return value of type: class java.util.ArrayList

原因没有深究,大概是$.ajax函数在前端接收的数据类型为JSON,而服务中没有能将ArrayList转换成JSON的类。

暂时记下解决方案——在项目中添加JSON全家桶的依赖如下:

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.9</version>
</dependency>

最新文章

  1. ListView.setAdapter(adapter);空指针异常的解决的总结
  2. shell数组操作
  3. docker push到本地仓库失败
  4. codeforces #round363 div2.C-Vacations (DP)
  5. ubuntu 双屏问题的解决方案
  6. sharepoint 浏览页面导航不正确
  7. 【shell】if
  8. Introduction to the Build Lifecycle
  9. 查询select
  10. maven之pom
  11. 201521123100 《java程序设计》第12周学习总结
  12. MongoDB Java
  13. 关于FIFO异步复位的问题
  14. STL之vector容器详解
  15. GIS开发之数据查询
  16. 003_饿了么chaosmonkey实现
  17. OSGI命令
  18. element-ui 表格翻页多选,数据回显
  19. hdu-6058 Kanade&#39;s sum
  20. CentOS6.4挂载读写NTFS分区 (重要)

热门文章

  1. Vue.nextTick 的原理和用途
  2. Android判断是debug还是release模式
  3. 现身说法:面对DDoS攻击时该如何防御?
  4. 【TensorFlow探索之一】MNIST的初步尝试
  5. 洛谷P2401 不等数列 题解
  6. Kendo UI for jQuery使用教程:支持Web浏览器
  7. 点对点协议PPP
  8. fail2ban CentOS7安装
  9. HTML5测试(二)
  10. linux-包管理器-4