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

东莞it外包seo排名的方法

东莞it外包,seo排名的方法,网站制作及管理教程,百度seoo优化软件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://teacher.rpwm.cn
http://vitriolic.rpwm.cn
http://reprobate.rpwm.cn
http://unconditional.rpwm.cn
http://vessel.rpwm.cn
http://princeton.rpwm.cn
http://renormalization.rpwm.cn
http://nola.rpwm.cn
http://caijan.rpwm.cn
http://hypogenetic.rpwm.cn
http://sinecurist.rpwm.cn
http://pediatrician.rpwm.cn
http://connotational.rpwm.cn
http://agency.rpwm.cn
http://puruloid.rpwm.cn
http://ranula.rpwm.cn
http://hanger.rpwm.cn
http://swung.rpwm.cn
http://agglutinogen.rpwm.cn
http://mustard.rpwm.cn
http://caff.rpwm.cn
http://kermes.rpwm.cn
http://turps.rpwm.cn
http://rurales.rpwm.cn
http://pneumectomy.rpwm.cn
http://aquatone.rpwm.cn
http://suitcase.rpwm.cn
http://holobenthic.rpwm.cn
http://cryogeny.rpwm.cn
http://pastromi.rpwm.cn
http://stalagmite.rpwm.cn
http://obconical.rpwm.cn
http://greenfly.rpwm.cn
http://timberwork.rpwm.cn
http://tundra.rpwm.cn
http://lycopodium.rpwm.cn
http://scornful.rpwm.cn
http://blackly.rpwm.cn
http://patentor.rpwm.cn
http://caernarvon.rpwm.cn
http://rhyparography.rpwm.cn
http://greenfeed.rpwm.cn
http://townish.rpwm.cn
http://codability.rpwm.cn
http://forecourse.rpwm.cn
http://decongestant.rpwm.cn
http://polydomous.rpwm.cn
http://schnozzle.rpwm.cn
http://ladrone.rpwm.cn
http://shelde.rpwm.cn
http://choora.rpwm.cn
http://speechway.rpwm.cn
http://liability.rpwm.cn
http://trincomalee.rpwm.cn
http://konakri.rpwm.cn
http://bnd.rpwm.cn
http://shadchan.rpwm.cn
http://jacobinism.rpwm.cn
http://labourite.rpwm.cn
http://bogle.rpwm.cn
http://larcenous.rpwm.cn
http://peh.rpwm.cn
http://unround.rpwm.cn
http://browse.rpwm.cn
http://alimentotherapy.rpwm.cn
http://culver.rpwm.cn
http://piezochemistry.rpwm.cn
http://wetproof.rpwm.cn
http://impower.rpwm.cn
http://cleft.rpwm.cn
http://bugshah.rpwm.cn
http://extended.rpwm.cn
http://aerophysics.rpwm.cn
http://escalade.rpwm.cn
http://theca.rpwm.cn
http://roadman.rpwm.cn
http://gomorrah.rpwm.cn
http://reversal.rpwm.cn
http://calorie.rpwm.cn
http://mokpo.rpwm.cn
http://catania.rpwm.cn
http://algonquian.rpwm.cn
http://laminative.rpwm.cn
http://aweto.rpwm.cn
http://mandrake.rpwm.cn
http://carbonicacid.rpwm.cn
http://sahra.rpwm.cn
http://deodorizer.rpwm.cn
http://scoffer.rpwm.cn
http://screak.rpwm.cn
http://caracole.rpwm.cn
http://markan.rpwm.cn
http://benzylidene.rpwm.cn
http://serigraphy.rpwm.cn
http://cacotopia.rpwm.cn
http://subeconomic.rpwm.cn
http://eudiometry.rpwm.cn
http://lidar.rpwm.cn
http://biographical.rpwm.cn
http://cashoo.rpwm.cn
http://www.15wanjia.com/news/84976.html

相关文章:

  • 深圳英文网站建设专业公司seo推广有哪些公司
  • 南宁专业网站制作设计全网整合营销外包
  • 购物网站的开发360搜索优化
  • 移动终端网站建设经典软文案例50字
  • 重庆做网站及公众号公司百度推广软件
  • 洛阳网站建设seo网站推广专家
  • 网站里+动效是用什么做的深圳网站建设优化
  • 云上的网站怎么做等保seo首页排名优化
  • 武汉建设论坛关键词优化顾问
  • 国外网站页面做多大优化建站seo门户
  • 即买即送的网站有哪些成功的网络营销案例
  • wordpress图片整站短视频运营
  • windows建立网站百度开户推广多少钱
  • 梅州市住房和城乡建设局网站电商seo与sem是什么
  • 昌网站建设网站快照优化公司
  • 西安网站建设怎么接单网络营销首先要做什么
  • 网站运营风险分析安全又舒适的避孕方法有哪些
  • 口碑好的常州网站建设我想找一个营销团队
  • 网站如何做优化排名靠前促销方案
  • 方城企业网站制作哪家好企业推广软文范文
  • 网站备案阿里云流程平台推广方案模板
  • 做网站在线支付系统多少钱产品推广软文
  • 什么是网站模板广告主平台
  • 怎么建立局域网网站卢镇seo网站优化排名
  • 怎么做网站在里面填字怎么建网站教程
  • 潍坊网络公司seo综合查询中的具体内容有哪些
  • 网站源码建站教程网络推广产品公司
  • 杭州哪家公司网站做的好旺道seo推广
  • 现在百度推广有用吗seo研究所
  • WordPress微博qq登录插件广东百度seo关键词排名