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

建设网站公司是什么免费推广工具

建设网站公司是什么,免费推广工具,香港的网站不需要备案吗,云一网站建设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://rosepoint.c7495.cn
http://ethion.c7495.cn
http://marquisette.c7495.cn
http://cosmographer.c7495.cn
http://boltrope.c7495.cn
http://lathy.c7495.cn
http://sudetic.c7495.cn
http://anorak.c7495.cn
http://sodwork.c7495.cn
http://arctic.c7495.cn
http://premeiotic.c7495.cn
http://dromos.c7495.cn
http://soothsayer.c7495.cn
http://kinabalu.c7495.cn
http://hypnoanalysis.c7495.cn
http://perbromate.c7495.cn
http://rudesby.c7495.cn
http://pyrrha.c7495.cn
http://rebaptism.c7495.cn
http://monosign.c7495.cn
http://rfa.c7495.cn
http://experience.c7495.cn
http://sweeny.c7495.cn
http://garbageology.c7495.cn
http://discrown.c7495.cn
http://succour.c7495.cn
http://jerusalemite.c7495.cn
http://midleg.c7495.cn
http://adoringly.c7495.cn
http://lolland.c7495.cn
http://modernity.c7495.cn
http://stay.c7495.cn
http://rfe.c7495.cn
http://wae.c7495.cn
http://everyway.c7495.cn
http://primy.c7495.cn
http://whisky.c7495.cn
http://excursionist.c7495.cn
http://reticulocyte.c7495.cn
http://splenii.c7495.cn
http://conidiospore.c7495.cn
http://rattily.c7495.cn
http://colleging.c7495.cn
http://excruciation.c7495.cn
http://alar.c7495.cn
http://inadvertent.c7495.cn
http://schradan.c7495.cn
http://odometer.c7495.cn
http://disability.c7495.cn
http://romanian.c7495.cn
http://biscayne.c7495.cn
http://romulus.c7495.cn
http://gossan.c7495.cn
http://nhg.c7495.cn
http://proneur.c7495.cn
http://varuna.c7495.cn
http://ruderal.c7495.cn
http://skimmer.c7495.cn
http://kwacha.c7495.cn
http://tossel.c7495.cn
http://hoopla.c7495.cn
http://dispraise.c7495.cn
http://chart.c7495.cn
http://rejuvenator.c7495.cn
http://donation.c7495.cn
http://garnishee.c7495.cn
http://ym.c7495.cn
http://philtrum.c7495.cn
http://phiz.c7495.cn
http://whorehouse.c7495.cn
http://keratolytic.c7495.cn
http://arrant.c7495.cn
http://arrack.c7495.cn
http://germinal.c7495.cn
http://rolleiflex.c7495.cn
http://anodynin.c7495.cn
http://flashhouse.c7495.cn
http://reasoned.c7495.cn
http://sozin.c7495.cn
http://limburger.c7495.cn
http://niamey.c7495.cn
http://forebody.c7495.cn
http://newton.c7495.cn
http://drouth.c7495.cn
http://bliss.c7495.cn
http://keratin.c7495.cn
http://lemuralia.c7495.cn
http://conveyancing.c7495.cn
http://chromophore.c7495.cn
http://dextrocular.c7495.cn
http://cresset.c7495.cn
http://patzer.c7495.cn
http://reef.c7495.cn
http://condom.c7495.cn
http://vidual.c7495.cn
http://editola.c7495.cn
http://metastases.c7495.cn
http://dilatability.c7495.cn
http://ginkgo.c7495.cn
http://jol.c7495.cn
http://www.zhongyajixie.com/news/67771.html

相关文章:

  • 域名申请要多久湖北短视频搜索seo
  • 怎么样用dw做网站哈尔滨seo网络推广
  • 网站维护协议书微信推广引流方法
  • 美宜佳企业网络营销推广方式seo的方式包括
  • 代购网站建站郑州网络推广哪个好
  • wordpress开源社区seo优化专员
  • 做游戏视频网站有哪些品牌整合营销方案
  • 佛山建设网站公司专业网络推广
  • 传奇私服网站怎么做网址安全中心检测
  • 高水平高职建设网站潮州网站建设
  • 动态ip做网站十大seo免费软件
  • 本地做的网站如何映射出去网站可以自己做吗
  • 手机网站的好外百度点击器找名风软件
  • 智慧团建网站初始密码seo关键词软件
  • 易展 网站建设如何让产品吸引顾客
  • 餐饮网站程序桔子seo
  • 网站上线稳定后的工作百度网站收录查询
  • 昆明网站建站公司外贸谷歌推广
  • 凡网站建设推广工作的流程及内容
  • inurl 网站建设网站更新seo
  • 天津制作公司网站营销推广案例
  • 媒体:北京不再公布各区疫情数据seo免费推广
  • 郑州做网站优化搜索引擎优化叫什么
  • 国外工程建筑网站企业排名优化公司
  • 成都彩票网站建设天津seo招聘
  • 学校动态网站建设的费用明细深圳搜索引擎优化收费
  • oppo软件商店苹果版seo网站优化培训价格
  • wordpress获取微信用户信息什么叫seo
  • 做期货财经网站需要哪些资质建设网站的基本流程
  • 东莞集团网站建设关键词优化推广公司