解决No converter found for return value of type: class java.util.ArrayList

蔚桐
2023-12-01

原因:

在返回list型json对象的时候缺了包

解决:

在pom.xml中添加:

  <properties>
    <jackson.version>2.5.4</jackson.version>
  </properties> 


  <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>

参考:

https://www.cnblogs.com/hafiz/p/5812873.html

 类似资料: