当前位置:   article > 正文

bug记录:java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer解决方案

java.lang.classcastexception: java.math.biginteger cannot be cast to java.la

今日Bug:java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer

开发环境:
JDK:1.8
MAVEN:3.5.4
IDEA:2019.3
SpringBoot:2.2.6
Redis:3.0.504

** 问题描述:测试添加数据,运行报错:java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Integer 数据类型错误**

原代码:
在这里插入图片描述

解决方案:将map.get()获取的数据类型改为BigInteger

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/天景科技苑/article/detail/1011941
推荐阅读
相关标签
  

闽ICP备14008679号