Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一组密钥,我想检查我的 redis 数据库中是否存在这些密钥。我如何使用 redisson 库来做到这一点?
您可以使用isExists函数检查密钥是否存在于 redis 中。
这是参考链接:Redis-commands-mapping-with-redisson
RedissonKeys.countExists(String... name) 可以帮助您确定密钥是否存在,而无需事先知道它的类型。
我认为这是你需要的。