Long incrSec = (Long) redisTemplate.opsForHash().get("redisLimitSec:" + limitKey, datekey);
解决的方法:使用String中转一下
Long incrSec = Long.parseLong(redisTemplate.opsForHash().get("redisLimitSec:" + limitKey, datekey).toString());
出现的原因:(根本的原因还是没有解决)
edisTemplate.opsForHash().get("redisLimitSec:" + limitKey, datekey).toString()返回的是object
但是 instanceof 是Integer,这样把这种类型的转成Long是不允许的
基本数据类型和引用类型不能进行强转,而Object非基本,所以必须先强转为Number,



