關於java.math.BigInteger cannot be cast to java.lang.Integer小方法

mysql數據庫 Biginteger 轉換爲Integer、Long類型時的錯誤:error提示java.math.BigInteger cannot be cast to java.lang.Integer 做項目時用到原生sql count(*)查詢時出現的,記錄一下方便以後參考: 解決方法如下: 現將查詢的結果toString()一下,然後用Integer.valueOf()方法強轉就可以
相關文章
相關標籤/搜索