No converter found for return value of type: class java.util.ArrayList
Posted 闲言博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No converter found for return value of type: class java.util.ArrayList相关的知识,希望对你有一定的参考价值。
错误产生环境
springmvc方法实验@ResponseBody注解时产生
错误描述
No converter found for return value of type: class java.util.ArrayList
错误原因
@ResponseBody
注解要依赖jackson包
解决办法
添加jackson依赖
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.11.0</version>
</dependency>
以上是关于No converter found for return value of type: class java.util.ArrayList的主要内容,如果未能解决你的问题,请参考以下文章
No converter found for return value of type: class
springmvc出现 No converter found for return value of type错误
springmvc出现 No converter found for return value of type错误
java.lang.IllegalArgumentException: No converter found for return value of type:
No converter found for return value of type: class java.util.ArrayList
No converter found for return value of type: class java.util.ArrayList