There is no such thing as perfect programming, but we shouldn’t be discouraged because programming is a constant pursuit of perfection.
Valueoperations.set (countKey, "1", duration, timeunit.milliseconds); / / get expiration time, return in seconds stringRedisTemplate. GetExpire (countKey);Copy the code