更新时间:2023-02-25 22:59:32
您可以在默认构造函数中或在声明时设置它:
You can either set it in the default constructor, or on declaration:
public class POI {
@JsonProperty("name")
private String name;
public POI() {
name = "";
}
}
或
public class POI {
@JsonProperty("name")
private String name = "";
}