I have been stuck with this problem with quite some time.I want to get keys from redis using redis template. I tried this.redistemplate.keys(\"*\"); but this doesn\'t fetch
try:
Set<byte[]> keys = RedisTemplate.getConnectionFactory().getConnection().keys("*".getBytes()); Iterator<byte[]> it = keys.iterator(); while(it.hasNext()){ byte[] data = (byte[])it.next(); System.out.println(new String(data, 0, data.length)); }