SpringBoot 转 Json 对 BigDecimal 格式化
SpringBoot 转 Json 对 BigDecimal 格式化
——SpringBoot 返回对象自动转 Json 时对 BigDecimal 格式化
先说全局配置;
最后说怎样局部配置 (去掉两个注解就行);
——感谢原文: https://www.jianshu.com/p/db07543ffe0a
经过一番操作, 可以达到下面的效果
public class Example{
// 不加 @BigDecimalFormat 注解, 在输出后转为 1.23
private
原创
2021-07-13 19:13:08 ·
6584 阅读 ·
3 评论