package xx.jedis; import java.util.Set; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; import com.alibaba.fastjson.JSON; public class JedisTest { public static void main(String[] args) { JedisPool jedisPool = new JedisPool("10.68.18.141", 6379); // docker Jedis jedis = jedisPool.getResource(); Set<String> set = jedis.keys("*"); System.out.println(JSON.toJSONString(set)); System.out.println(JSON.toJSONString(jedis.get("boss_4031_412_cuochecode"))); // 10分钟内有效验证码 System.out.println(JSON.toJSONString(jedis.get("boss_4031_412_cuocheSendSmsVerifyCode"))); // 一分钟次数 System.out.println(JSON.toJSONString(jedis.get("boss_4031_412_cuocheSendSmsVerifyCodeCount")));// 一天次数
} }