String key = "cms:user:id";
RedisAtomicLong entityIdCounter = new RedisAtomicLong(key, redisTemplate.getConnectionFactory());
Long increment = entityIdCounter.getAndIncrement();
System.out.println(increment);
Springboot使用@redistemplate 自增出错 redis ERR value is not an integer or out of range
最新推荐文章于 2024-05-28 22:34:05 发布