出错代码:接收泛型指定是Integer 但是在接测试中 频频抛出java.lang.Long cannot be cast to java.lang.Integer异常,debug 发现Map中的参数确实是Long类型的。
解决办法:
使用父类的Number接收,在使用intValue()方法转成int
原因分析:
该字段的值是count(*) 的结果,网上查了下count(*)的返回结果为BIGINT。应该是此原因导致的。
出错代码:接收泛型指定是Integer 但是在接测试中 频频抛出java.lang.Long cannot be cast to java.lang.Integer异常,debug 发现Map中的参数确实是Long类型的。
解决办法:
使用父类的Number接收,在使用intValue()方法转成int
原因分析:
该字段的值是count(*) 的结果,网上查了下count(*)的返回结果为BIGINT。应该是此原因导致的。