问题:实体属性是Long类型,在后端值本来是1119102511023023410,但是返回给前端的却是1119102511023023400
解决方案:添加序列化注解
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;// 引入jackson的序列化类public class Test implements Serializable { @JsonSerialize(using = ToStringSerializer.class)
private Long testProperty;}