String pattern="Team:*"
Integer perCount = 1000;
List<String> keys = Lists.newArrayList();
redisTemplate.execute((RedisConnection connection) -> {
try (Cursor<byte[]> cursor = connection.scan(ScanOptions.scanOptions().count(perCount).match(pattern).build())) {
while (cursor.hasNext()){
String key = new String(cursor.next(), StandardCharsets.UTF_8);
keys.add(key);
//do yourthing
}catch (IOException e) {
throw new RuntimeException(e);
}