标签:pre pac sys out int nal jedis div stat
创建maven项目
2.导入jar包
<dependencies> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> </dependencies>
3.测试
package cn.zys.redis; import redis.clients.jedis.Jedis; public class redisTest { private static final String host = "192.168.6.178"; private static final int prot = 6379; public static void main(String[] args) { Jedis jedis = new Jedis(host,prot); System.out.println(jedis); String pong = jedis.ping(); System.out.println(pong + "测试是否连通"); } }
标签:pre pac sys out int nal jedis div stat
原文地址:https://www.cnblogs.com/xiaozhang666/p/12218738.html