public boolean hexists(String key, Object field) { hashOps = redisTemplate.opsForHash(); return hashOps.hasKey(key, field); }
/** * Hash数据类型 查找 key绑定的hash集合中hashKey 的元素是否存在 * * @param key * @param hashKey * @return true存在 false不存在 */ public boolean hasHashKey(String key, Object hashKey) { hashOps = redisTemplate.opsForHash(); return hashOps.hasKey(key, hashKey); }