对应的dto如下:
@NoArgsConstructor
@Data
public class BridgeClimateDto {
private String id;
private List<ArraysBean> arrays;
@NoArgsConstructor
@Data
public static class ArraysBean {
private BigDecimal windspeed;
private String winddirection;
private BigDecimal airtemperature;
private BigDecimal humidity;
private BigDecimal pressure;
private BigDecimal visibility;
private BigDecimal watervolume;
private BigDecimal flowrate;
private BigDecimal waterlevel;
private BigDecimal currentvelocity;
}
}
对应的获取的入口如下:
@At
@POST
@AdaptBy(type=JsonAdaptor.class)
public NutMap add(@Param("arrays") List<BridgeClimateDto.ArraysBean> arraysBeanList, @Param("..") BridgeClimateDto bridgeClimateDto) {
log.info(Json.toJson(bridgeClimateDto,JsonFormat.compact()));
log.info(Json.toJson(arraysBeanList,JsonFormat.compact()));
}
打出的日志如下: