当前位置: 首页 > wzjs >正文

文联网站建设方案网页设计需要掌握哪些技能

文联网站建设方案,网页设计需要掌握哪些技能,wordpress速度慢啊,找装修公司网站目录 Redis命令 通用命令 String Key的顶层格式 Hash List Set SortedSet Redis命令 通用命令 想知道某个命令怎么用 1.可以在官网学习用法 https://www.redis.net.cn/order/ 2. 使用 help命令 String Key的顶层格式 Hash List Set SortedSet 在IDEA使用Jedis操作…

目录

Redis命令

通用命令

String

Key的顶层格式

Hash

List

Set

SortedSet


Redis命令

通用命令

想知道某个命令怎么用

1.可以在官网学习用法

https://www.redis.net.cn/order/

2.  使用 help+命令

String

Key的顶层格式

Hash

List

Set

SortedSet

在IDEA使用Jedis操作Redis

常规使用

引入依赖

我的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.leo</groupId><artifactId>jedis-work</artifactId><version>1.0-SNAPSHOT</version><packaging>jar</packaging><name>jedis-work</name><url>http://maven.apache.org</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><junit.jupiter.version>5.7.0</junit.jupiter.version></properties><dependencies><!--jedis--><dependency><groupId>redis.clients</groupId><artifactId>jedis</artifactId><version>3.7.0</version></dependency><!--单元测试--><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.7.0</version><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.22.2</version><configuration><includes><include>**/*Test.java</include><include>**/*Tests.java</include></includes></configuration></plugin></plugins></build>
</project>

我的测试

package com.leo.test;import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import redis.clients.jedis.Jedis;
import org.junit.jupiter.api.Test;public class TestRedis {private Jedis jedis;@BeforeEachvoid setUp() {// 1.建立连接jedis = new Jedis("192.168.**.**", 6379);  //根据自己的ip// 2.设置密码jedis.auth("***");   自己的密码// 3.选择库jedis.select(0);}@Testvoid testString() {// 存入数据String result = jedis.set("name2", "大哥");System.out.println("result = " + result);// 获取数据String name = jedis.get("name2");System.out.println("name = " + name);}@AfterEachvoid tearDown() {if (jedis != null) {jedis.close();}}
}

Jedis的连接池

1.配置Jedis连接池工具类

package Utils;import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;public class JedisConnectionFactory {private static final JedisPool jedisPool;static {//配置连接池JedisPoolConfig poolConfig = new JedisPoolConfig();poolConfig.setMaxTotal(8);poolConfig.setMaxIdle(8);poolConfig.setMinIdle(0);poolConfig.setMaxWaitMillis(1000);//创建连接池对象jedisPool = new JedisPool(poolConfig,"192.168.88.134",6379,1000,"123321");}public static Jedis getJedis(){return jedisPool.getResource();}
}

建立连接使用工具类 

package com.leo.test;import Utils.JedisConnectionFactory;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import redis.clients.jedis.Jedis;
import org.junit.jupiter.api.Test;
import redis.clients.jedis.JedisFactory;
import redis.clients.jedis.JedisPool;public class TestRedis {private Jedis jedis;@BeforeEachvoid setUp() {// 1.建立连接//  方式1// jedis = new Jedis("192.168.88.134", 6379);//  方式2jedis= JedisConnectionFactory.getJedis();// 2.设置密码jedis.auth("123321");// 3.选择库jedis.select(0);}@Testvoid testString() {// 存入数据String result = jedis.set("name3", "小弟");System.out.println("result = " + result);// 获取数据String name = jedis.get("name3");System.out.println("name = " + name);}@AfterEachvoid tearDown() {if (jedis != null) {jedis.close();}}
}


文章转载自:

http://MvbszB74.wqwbj.cn
http://Cssa0rUf.wqwbj.cn
http://zjhEghH5.wqwbj.cn
http://jR3AGrUf.wqwbj.cn
http://qFLoHIxf.wqwbj.cn
http://FIbsuH4I.wqwbj.cn
http://jjTQ4iba.wqwbj.cn
http://xubLfL2i.wqwbj.cn
http://May6C1gg.wqwbj.cn
http://CivlIZfY.wqwbj.cn
http://PYHyJDC6.wqwbj.cn
http://JHC5di1w.wqwbj.cn
http://E8GUdEI9.wqwbj.cn
http://5fsBTAwq.wqwbj.cn
http://hLZ7afGF.wqwbj.cn
http://8GWQ6WAE.wqwbj.cn
http://pyqslesZ.wqwbj.cn
http://bAvqZ3mK.wqwbj.cn
http://1p8V7KSd.wqwbj.cn
http://25rJnfUw.wqwbj.cn
http://rcZ4KK5Q.wqwbj.cn
http://0tIvRv5V.wqwbj.cn
http://Nbl1Vk1s.wqwbj.cn
http://oGa8i7J6.wqwbj.cn
http://fmPkq9FP.wqwbj.cn
http://bOwhmwHQ.wqwbj.cn
http://xw1klKNp.wqwbj.cn
http://3FhxsFDs.wqwbj.cn
http://uQCgri1R.wqwbj.cn
http://CWY7W2xr.wqwbj.cn
http://www.dtcms.com/wzjs/721748.html

相关文章:

  • iis7 asp网站 503wordpress+屏蔽ip插件
  • 张家界做网站找哪家好抖音引流推广免费软件app
  • 网站的系统建设方式有哪些方面烟台企业网站建设
  • 外贸公司网站建设费用 如何申请建设信用卡分期购物网站
  • 北京网站设计联系方式广告设计公司公司vi设计
  • wordpress网站背景爱范儿 wordpress
  • 网站建设费用是多少政务网站建设 发言
  • 做pvc卡片的交流网站wordpress二维码分享
  • 福州网站重新建设网站的报告
  • 潍坊路通工程建设有限公司网站上传视频网站开发
  • 自学网站建设教程现在网站如何做优化
  • 做个小网站多少钱wordpress如何秒开
  • 灰色网站欣赏阿里云服务器网站开发
  • 海南论坛论坛网站建设光山网站建设
  • 免费素材库大全网站深圳网站设计公司排名
  • 蓝牙音箱东莞网站建设新闻源代发网站怎么做
  • 中国域名网站排名微信官方网站网址
  • 专业app网站建设泰和网站制作
  • 网站永久空间密山网站建设
  • 2017最新网站icp备案问卷调查网站哪个好
  • 网站建站 优化推广昌吉做网站
  • 成都网站优化平台网页网站导读怎么做
  • 做网站花多少钱深圳pc端网站开发
  • 可以做游戏的网站有哪些wordpress主题名字
  • 企业网站建设哪家快广州网站优化
  • 杭州网站定制开发微信网站开发与网站实质区别
  • python做网站还是数据库30岁做网站运营
  • 东莞网站网络阿里巴巴国际站怎么找客户
  • 百度一下官方网站wordpress 导入md
  • 朝阳做网站企业加盟网站建设