理论 Jedis是redis的java版本的客户端实现,使用Jedis提供的Java API对Redis进行操作,是Redis官方推崇的方式;并且,使用Jedis提供的对Redis的支持也最为灵活、全面;不足之处,就是编码复杂度较高。 引入包 <!--Jedis--> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>4.3.1</version> </dependency> 案例演示 获取Redis连接对象 // 获取Jedis对象 private static Jedis getJedis() { Jedis jedis = new Jedis("自己的地址", 端口); jedis.auth("111111"); return jedis; } Redis 案列 Jedis jedis = getJedis(); //geo String geo_key = getKey(); jedis.geoadd(geo_key, getGeo());...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with return
Contact return, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack