这是linewithinrequestid对象:
@Getter
@Setter
@Data
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class LineWithinRequestID {
@JsonProperty("id")
private Long id;
@JsonProperty("srid")
private Integer srid;
@JsonProperty("coordinates")
private List<List<Double>> coordinateList;
}
这是我内部的polygonresponse对象:
@Getter
@Setter
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class WithinPolygonResponse {
@JsonProperty("status")
private Boolean status;
}
这是我所提出的要求:
{
"id": 2,
"srid": 4326,
"coordinates": [
[
[-77.292894, 38.392816, 0], [-77.169498, 38.468925, 0], [-77.204214, 38.568971, 0]
]
]
}
我做错了什么?我是Springboot和Swagger
的新手我明白了,愚蠢的错字。
{
"id": 2,
"srid": 4326,
"coordinates": [
--->[
[-77.292894, 38.392816, 0], [-77.169498, 38.468925, 0], [-77.204214, 38.568971, 0]
]<---
]
}