No converter found for return value of type: class java.util.ArrayList
程序员文章站
2024-01-14 12:06:22
...
下面的意思是没有找到类型:类java.util.arraylist的返回值的转换器 。
我在代码中已经加上了aaa@qq.com注解==响应的应该是json字符串,但是出现了上述错误,然后找到原因是少了jackson的包(@ResponseBody注解要依赖jackson包),加上即可,可能会问为什么不会报没有jackson包的错,这其实就跟解耦有关系了。
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
上一篇: 为啥选择PHP
推荐阅读
-
No converter found for return value of type: class java.util.ArrayList
-
No converter found for return value of type: class XXX
-
【Spring】No converter found for return value of type: class java.util.ArrayList
-
关于No converter found for return value of type: class java.util.ArrayList
-
HTTP Status 500 - No converter found for return value of type: class java.util.ArrayList
-
SpringMVC 报错HTTP Status 500 - No converter found for return value of type解决方案
-
springboot报错_No converter found for return value of type原因是没有这个对象的json转换器
-
SpringMVC 访问Controller 报错:e No converter found for return value of type: class java.util.ArrayLis
-
SpringMVC 报错HTTP Status 500 - No converter found for return value of type解决方案