不会写代码如何做网站,网站建设包含seo吗,建设局网站港府名都,中交路桥建设有限公司资质文章目录 1、Jedis简介2、环境准备3、创建maven普通项目,导入如下依赖4、测试JAVA程序和Redis之间的通信 1、Jedis简介 Jedis 通常是作为 Java Redis 的缩写或简称来理解的。Java Embedded Data Structures Interface 表示 Java嵌入式数据结构接口 2、… 文章目录 1、Jedis简介2、环境准备3、创建maven普通项目,导入如下依赖4、测试JAVA程序和Redis之间的通信 1、Jedis简介 Jedis 通常是作为 Java Redis 的缩写或简称来理解的。Java Embedded Data Structures Interface 表示 Java嵌入式数据结构接口 2、环境准备 3、创建maven普通项目,导入如下依赖
?xml version1.0 encodingUTF-8?
project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.atguigu/groupIdartifactIdredis-jedis/artifactIdversion1.0-SNAPSHOT/versiondependenciesdependencygroupIdredis.clients/groupIdartifactIdjedis/artifactIdversion2.9.0/version/dependency!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api --dependencygroupIdorg.junit.jupiter/groupIdartifactIdjunit-jupiter-api/artifactIdversion5.8.1/versionscopetest/scope/dependency/dependencies/project4、测试JAVA程序和Redis之间的通信
package com.atguigu.jedis;
import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;
public class Test01 {Testpublic void test01(){Jedis jedis new Jedis(192.168.74.148, 6379);String pong jedis.ping();System.out.println(pong pong);jedis.close();}
}