我是spring boot的新手,试图完成以下任务
数据表:
FurnitureHeight FurnitureWidth FurnitureDepth
20 35 80
20 45 83
45 102 90
45 35 90
45 67 99
预期输出:
20: {
width:[35,45],
depth:[80,83]
}
45: {
width:[35,102,67],
depth:[90,99]
}
我的实体类如下
public class FurnitureSpecification {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "furnitureheight")
@JsonProperty("furnitureheight")
@Getter
private Integer furnitureheight;
@Column(name = "furniturewidth")
@JsonProperty("furniturewidth")
private Integer furniturewidth;
@Column(name = "furnituredepth")
@JsonProperty("furnituredepth")
private Integer furnituredepth;
}
感谢大家对分组工作原理的任何参考,感谢所有帮助