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

东莞网络公司哪个网站好网站如何进行网络推广

东莞网络公司哪个网站好,网站如何进行网络推广,企业推广软件有哪些,wordpress虚拟储存1.1 简介 1.1.1 概述 Spring Data 中有一个成员 Spring Data Redis,他提供了 RedisTemplate 可以在 Spring 应用中更简便的访问 Redis 以及异常处理及序列化,支持发布订阅等操作。 1.2 RedisTemplate 常见 API   RedisTemplate 针对 jedis 客户端中大…

1.1 简介

1.1.1 概述

  Spring Data 中有一个成员 Spring Data Redis,他提供了 RedisTemplate 可以在 Spring 应用中更简便的访问 Redis 以及异常处理及序列化,支持发布订阅等操作。

1.2 RedisTemplate 常见 API
  RedisTemplate 针对 jedis 客户端中大量 API 进行了归类封装,将同一类型操作封装为 operation 接口

   ♞ ValueOperations: 简单 string 操作
 ♞ ListOperations:    针对 list 类型的数据操作
 ♞ HashOperations: 针对 hash 即 map 类型的数据操作
 ♞ SetOperations:    set 类型数据操作
 ♞ ZSetOperations:  zset 类型数据操作

☞ 示例


@SpringBootTest
public class RedisTest {@Autowiredprivate RedisTemplate redisTemplate;@Testpublic void redis() {redisTemplate.opsForValue().set("name", "张三");Object name = redisTemplate.opsForValue().get("name");System.out.println(name);}
}

1.2.2 BoundKeyOperations
  RedisTemplate 提供了对 key 的 bound(绑定) 便捷化操作 API,可以通过 bound 封装指定的 key,然后进行一系列的操作而无须显式的再次指定 Key。

    ♞ BoundValueOperations:  绑定 string 类型的 key
♞ BoundListOperations:      绑定 list 类型的 key
 ♞ BoundHashOperations:   绑定 hash 即 map 类型的 key
 ♞ BoundSetOperations:      绑定 set 类型的 key
♞ BoundZSetOperations:    绑定 zset 类型的 key

☞ 示例


@SpringBootTest
public class RedisTest {@Autowiredprivate RedisTemplate redisTemplate;@Testpublic void redis() {Object name = redisTemplate.boundValueOps("name").get();System.out.println(name);}
}

1.3 数据操作

1.3.1 通用方法
(通用方法)删除 key
// 删除单个 key,返回布尔值
redisTemplate.delete(K key);// 删除多个 key,返回删除的个数
redisTemplate.delete(Collection<K> keys);
(通用方法)判断 key 是否存在
// 返回布尔值
redisTemplate.hasKey(key);
(通用方法) key 有效时间
// 指定有效时间
redisTemplate.expire(key, time, TimeUnit.MINUTES);// 获取有效时间,返回值单位为秒
redisTemplate.getExpire(key);
1.3.2 操作 string
(string类型)添加数据
// 通过 ValueOperations 设置值
ValueOperations ops = redisTemplate.opsForValue();
// 存入数据
ops.set(key, value);	
// 设置过期时间
ops.set(key, value, time, TimeUnit.SECONDS);	// 通过 BoundValueOperations 设置值
BoundValueOperations key = redisTemplate.boundValueOps(key);
key.set(value);
key.set(value, time, TimeUnit.SECONDS);
 (string类型)获取数据
// 通过 ValueOperations 获取值
redisTemplate.opsForValue().get(key);// 通过 BoundValueOperations 获取值
redisTemplate.boundValueOps(key).get();
1.3.3 操作 list
(list类型) 添加数据
// 通过 ValueOperations 设置值
ListOperations opsList = redisTemplate.opsForList();
opsList.leftPush(listKey, listLeftValue);
opsList.rightPush(listKey, listRightValue);
// 存入集合
opsList.rightPushAll(list);	
opsList.leftPushAll(list);// BoundValueOperations 操作类似
(list类型) 获取数据
// 获取集合中的数据
redisTemplate.boundListOps(listKey).range(startIndex, endindex); // 根据索引获取数据
redisTemplate.boundListOps(listKey).index(index);// 集合长度
redisTemplate.boundListOps(listKey).size();
(list类型) 删除数据
// 从左侧弹出一个元素并返回
redisTemplate.boundListOps(listKey).leftPop();  // 从右侧弹出一个元素并返回
redisTemplate.boundListOps(listKey).rightPop(); // 移出 N 个值为 value 的元素
redisTemplate.boundListOps(listKey).remove(long, value); 
(list类型)修改数据
// 根据索引修改数据
redisTemplate.boundListOps(listKey).set(index, listLeftValue);
1.3.4 hash
(hash类型)添加数据
// 通过 BoundValueOperations 设置值
BoundHashOperations hashKey = redisTemplate.boundHashOps(HashKey);
hashKey.put(key, Vaue);
// 添加一个集合
hashKey.putAll(hashMap); // 通过 ValueOperations 设置值
HashOperations hashOps = redisTemplate.opsForHash();
hashOps.put(HashKey, key, Vaue);
(hash类型)获取数据
// 获取所有小 key
redisTemplate.boundHashOps(HashKey).keys();// 根据小 key 获取值
redisTemplate.boundHashOps(HashKey)get(key);// 获取所有键值对集合
redisTemplate.boundHashOps(HashKey).entries();
(hash类型)删除数据
// 判断 hash 中是否存在小 key
redisTemplate.boundHashOps(HashKey).hasKey(key);// 根据小 key 删除值
redisTemplate.boundHashOps(HashKey).delete(key);
1.3.5 set
(hash类型) 添加数据
// 通过 BoundValueOperations 设置值
redisTemplate.boundSetOps(setKey).add(setValue1, setValue2, setValue3);// 通过 ValueOperations 设置值
redisTemplate.opsForSet().add(setKey, SetValue1, setValue2, setValue");
(hash类型) 获取数据
// 获取所有值
redisTemplate.boundSetOps(setKey).members();// 获取 set 的长度
redisTemplate.boundSetOps(setKey).size();
(hash类型)删除数据
// 判断 set 中是否存在改值
redisTemplate.boundSetOps(setKey).isMember(setValue);// 移出指定的值
redisTemplate.boundSetOps(setKey).remove(setValue);
1.3.6 zset
(Zset类型) 添加数据
// 通过 BoundValueOperations 设置值
redisTemplate.boundZSetOps(zSetKey).add(zSetVaule, score);// 通过 ValueOperations 设置值
redisTemplate.opsForZSet().add(zSetKey, zSetVaule, score);
(Zset类型)获取数据
// 获取元素集合, 按照排名先后(从小到大)
redisTemplate.boundZSetOps(zSetKey).range(key, startIndex, endIndex);// 获取指定值的分数(权重)
redisTemplate.boundZSetOps(zSetKey).score(zSetVaule);// 获取 zset 长度
redisTemplate.boundZSetOps(zSetKey).size();
(Zset类型)修改分数
// 修改指定元素的分数
redisTemplate.boundZSetOps(zSetKey).incrementScore(zSetVaule, score);

(Zset类型)删除数据

// 删除指定元素
redisTemplate.boundZSetOps(zSetKey).remove(zSetVaule);// 删除指定索引范围的元素
redisTemplate.boundZSetOps(zSetKey).removeRange(strat, end);// 删除指定分数范围的元素
redisTemplate.boundZSetOps(zSetKey).removeRangeByScorssse(strat, end);


文章转载自:
http://sammy.c7513.cn
http://humanly.c7513.cn
http://reentrant.c7513.cn
http://benignantly.c7513.cn
http://pal.c7513.cn
http://haymaking.c7513.cn
http://rollway.c7513.cn
http://androphile.c7513.cn
http://trichinotic.c7513.cn
http://tashkent.c7513.cn
http://roscoelite.c7513.cn
http://running.c7513.cn
http://overwithhold.c7513.cn
http://hypersphere.c7513.cn
http://catfight.c7513.cn
http://bedabble.c7513.cn
http://sledge.c7513.cn
http://pdm.c7513.cn
http://biotron.c7513.cn
http://flatness.c7513.cn
http://longinquity.c7513.cn
http://lexigram.c7513.cn
http://proteinoid.c7513.cn
http://floodplain.c7513.cn
http://costrel.c7513.cn
http://gallego.c7513.cn
http://granitiform.c7513.cn
http://furriery.c7513.cn
http://spur.c7513.cn
http://ecclesiae.c7513.cn
http://architecturally.c7513.cn
http://pseudoclassicism.c7513.cn
http://clipper.c7513.cn
http://habatsu.c7513.cn
http://whey.c7513.cn
http://fluidify.c7513.cn
http://abiogenist.c7513.cn
http://densometer.c7513.cn
http://mitteleuropa.c7513.cn
http://friedmanite.c7513.cn
http://ridgeplate.c7513.cn
http://reluctancy.c7513.cn
http://doctoral.c7513.cn
http://kurdistan.c7513.cn
http://greyhound.c7513.cn
http://imparisyllabic.c7513.cn
http://circlet.c7513.cn
http://octet.c7513.cn
http://crinum.c7513.cn
http://sepulchral.c7513.cn
http://tridactyl.c7513.cn
http://fascicled.c7513.cn
http://raia.c7513.cn
http://coleoptera.c7513.cn
http://ophidian.c7513.cn
http://carecloth.c7513.cn
http://aif.c7513.cn
http://thicken.c7513.cn
http://holoparasitic.c7513.cn
http://runout.c7513.cn
http://anachronous.c7513.cn
http://pediatrist.c7513.cn
http://fillip.c7513.cn
http://falcial.c7513.cn
http://nitrogenous.c7513.cn
http://pathomorphology.c7513.cn
http://acyl.c7513.cn
http://hypabyssal.c7513.cn
http://sintering.c7513.cn
http://gaol.c7513.cn
http://regius.c7513.cn
http://frco.c7513.cn
http://sleuth.c7513.cn
http://psychosexuality.c7513.cn
http://server.c7513.cn
http://venerator.c7513.cn
http://quisling.c7513.cn
http://centroid.c7513.cn
http://perseid.c7513.cn
http://bootes.c7513.cn
http://mirthful.c7513.cn
http://mondo.c7513.cn
http://succeed.c7513.cn
http://alacarte.c7513.cn
http://lille.c7513.cn
http://bricoleur.c7513.cn
http://dwelt.c7513.cn
http://localite.c7513.cn
http://bajri.c7513.cn
http://cyclogenesis.c7513.cn
http://tonus.c7513.cn
http://liveware.c7513.cn
http://trample.c7513.cn
http://gault.c7513.cn
http://alkine.c7513.cn
http://semisedentary.c7513.cn
http://cqd.c7513.cn
http://smoothhound.c7513.cn
http://roband.c7513.cn
http://alcyonarian.c7513.cn
http://www.zhongyajixie.com/news/74012.html

相关文章:

  • 彩票网站代理怎么做视频营销案例
  • 电子商务网站建设风格baidu 百度一下
  • 建立有域名网站功能网络推广费用计入什么科目
  • 做网站需要懂什么技术北京软件开发公司
  • 自己怎么做机构网站镇江网站建设制作公司
  • 建筑网站资料营销培训课程有哪些
  • 做网站中怎么设置单张图片公众号免费推广平台
  • 游戏网站建设的目的教育培训网站模板
  • 政府网站建设实施方案郑州网站建设七彩科技
  • 电子商务个人网站可以备案吗最佳磁力吧ciliba搜索引擎
  • 六安做网站的各大引擎搜索入口
  • 电脑做网站端口映射深圳百度推广联系方式
  • 用什么程序做资讯类网站网络seo软件
  • 外国人爱做视频网站吗百度网盘电话人工服务
  • 网站开发实验报告总结百度保障中心人工电话
  • 网站建设标准 方案书免费站推广网站在线
  • 手机建网站公司免费软件下载网站有哪些
  • 盈利性网站域名选择网站免费发布与推广
  • wordpress 数据库表网店关键词怎么优化
  • 帮人做网站赚钱91关键词排名
  • 品牌展示榜ui做的好的网站怎么打广告吸引客户
  • 深圳网站建设公司招聘东莞网站建设工作
  • 广州市哪有做网站的十大最靠谱教育培训机构
  • 中山响应式网站建设互联网平台公司有哪些
  • 微信公众号做网站卖东西营销型网站建设优化建站
  • 企业网站seo外包 s知乎seo排名的搜软件
  • 网站要咋建立网络安全有名的培训学校
  • 界首做网站刷关键词排名系统
  • 西部数据网站建设四年级小新闻50字左右
  • 成都市城乡建设网站seo顾问阿亮博客