原文链接:
https://www.jianshu.com/p/5907ae7cba72
BigDecimal长度太长,返回给前端,精度会丢失,即后几位都会变成0.
解决办法:给前端返回字符串类型。
加注解: @JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
private BigDecimal price;
标签:返回,BigDecimal,前端,丢失,using,class
From: https://www.cnblogs.com/lyn8100/p/16866307.html