我正在沿着MongoDB使用Java spring-boot做一个项目。一切正常,并保存在数据库中,但是当我想从邮递员那里获取数据时,它说: “状态”:500, “错误”:“内部服务器错误”, “ message”:“在实体类org.javatuples.Pair上找不到属性值0,无法将构造函数参数绑定到该属性!”,
@AllArgsConstructor
@NoArgsConstructor
@Data
@JsonSerialize(using = BallSerializer.class)
@Document(collection = "ball")
public class Ball {
@DBRef
@Id
private String matchId;
private LocalDateTime dateTime;
private int overNumber;
private int ballNumber;
private Player bowler;
private Player batsman;
private Pair<RunType, Integer> runTypeIntegerPair;
private Pair<ExtraType, Integer> extraTypeIntegerPair;
private Pair<OutType, Player> outTypePlayerPair;
private String commentary;
private List<Comment> commentList;
private BallType ballType;
}