![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jedis
翼羽中天
这个作者很懒,什么都没留下…
展开
-
redis扫描用法
redis扫描用法//获取redis内所有以R****_开头的key 的 value集合public static List<String> getAllRecConfigList() { Jedis jedis = redisPool_slave.getResource(); try { if (null != jedis) { //扫描redis查看所有的key是否以R****_开头,记录并返回所有满原创 2021-04-09 09:09:39 · 379 阅读 · 0 评论 -
Jedis 使用try-with-resources 关闭连接
Jedis 使用try-with-resources 关闭连接try-with-resources Statement使用 try-with-resources Statement " try(resource) ",它会自动关闭括号内的资源(resources),不用手动添加代码 xx.close();实际上是有一个隐式 finally 中调用了 resource.close();关闭了资源。后面贴出编译后的代码可见。使用这个方法前提是,resource 必须继承自 java.lang.AutoC原创 2021-04-09 09:00:48 · 876 阅读 · 0 评论