1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > java.lang.ClassCastException: cannot assign instance of java.lang.Integer to of type java.math.BigD

java.lang.ClassCastException: cannot assign instance of java.lang.Integer to of type java.math.BigD

时间:2023-11-15 14:25:47

相关推荐

java.lang.ClassCastException: cannot assign instance of java.lang.Integer to  of type java.math.BigD

java.lang.ClassCastException: cannot assign instance of java.lang.Integer to field com.quanquan.store.dto.PMSCouponDTO.discountAmount of type java.math.BigDecimal in instance of com.quanquan.store.dto.PMSCouponDTO

…… io.xxx一大堆异常

开发中调取第三方接口的时候,传过来的JSON对象转成DTO(序列化对象)传到前端,报出了这个错

可能原因:BigDecimal是一个非序列化的对象类型,所以在序列化的时候可能会出现问题,慎用

解决方法:请清一下redis缓存

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。