docs: 调整注释
This commit is contained in:
parent
ab5dbd8901
commit
563455a412
@ -818,9 +818,9 @@ public class RedisUtils {
|
||||
if (incr == null) {
|
||||
throw new RuntimeException("Redis increment failed.");
|
||||
}
|
||||
// 设置过期时间(可选),例如每天的 key 在第二天自动过期
|
||||
// 设置过期时间
|
||||
if (incr == 1) {
|
||||
// 可选:设置 key 的过期时间,例如 24 小时后自动过期
|
||||
// 设置 key 的过期时间 24小时后自动过期
|
||||
redisTemplate.expire(key, 24, TimeUnit.HOURS);
|
||||
}
|
||||
return String.format("%0" + digits + "d", incr);
|
||||
|
Loading…
Reference in New Issue
Block a user