RedisTemplate中的delete(K key)方法
delete
public Boolean delete(K key)
Description copied from interface: RedisOperations
Delete given key.
Specified by:
delete in interface RedisOperations<K,V>
Parameters:
- key - must not be null.
Returns:
true if the key was removed.
See Also:
Redis Documentation: DEL https://redis.io/docs/latest/commands/del/
Redis中
Removes the specified keys. A key is ignored if it does not exist.
stringRedisTemplate.delete(LOGIN_CODE_KEY + phone);