问题说明 数据库存储为6942467019140959017 查询展示的为6942467019140959000 Long类型最长存储为16位,会存在精度丢失 解决方案 方案1: @JsonFormat(shape = JsonFormat.Shape.STRING) @Column(columnDefinition = "bigInt(20) comment '音乐分类id'") private Long musicTypeId; 方案2: 主键改用String类型或使用String字段接收