MappingInstantiationException: Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "a")
public class A {
private List<B> b; // 这里是数组
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class B {
private String bb;
}
}
{
"_id" : ObjectId("62df884326d4311d9c80de8d"),
"b" : {
"bb" : "test" //这里是对象
}
}