在实际项目中有时需要模糊查询redis,代码如下
public SetgetCacheKeys(String prex) { try { Set keys = redisTemplate.keys(prex + "*"); return keys; } catch (Exception e) { return Collections.EMPTY_SET; } }

在实际项目中有时需要模糊查询redis,代码如下
public SetgetCacheKeys(String prex) { try { Set keys = redisTemplate.keys(prex + "*"); return keys; } catch (Exception e) { return Collections.EMPTY_SET; } }