错误内容:
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `类路径` (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (StringReader); line: 1, column: 3] (through reference chain: java.util.ArrayList[0])
找了网上的两种解决方法都不行
1、在实体类中添加无参构造方法(程序启动时抛出异常)
2、在实体类添加注解 @NoArgsConstructor (抛出异常)
最终解决方法
在实体类添加两个注解 @NoArgsConstructor 、@AllArgsConstructor
感谢观看!