使用@JsonProperty注解
前台json
{
"id":2,
"A4_13":"2",
"A14_15":"2",
}
实体类
public class A{
/**
* 主键id
*/
@JsonProperty(value = "id")
private Long id;
/**
* 设备号
*/
@JsonProperty(value = "A4_13")
private String deviceNo;
/**
* 协议版本
*/
@JsonProperty(value = "A14_15")
private String protocolVer;
}