Java:無法把資料庫字段類型bigint轉化為java的long類型
錯誤提示如下所示:
- Can not set java.lang.Long field com.bigdata.plus.Entity.DatabaseInfo.tableRows to java.math.BigInteger
- Cannot invoke com.bigdata.plus.Entity.DatabaseInfo.setTableRows on bean class ‘class com.bigdata.plus.Entity.DatabaseInfo’ - argument type mismatch - had objects of type “java.math.BigInteger” but expected signature “java.lang.Long”
解決方法如下所示:
- 把BigInteger轉化為long類型