当前位置: 移动技术网 > IT编程>数据库>MongoDB > Spring security学习笔记(三)

Spring security学习笔记(三)

2018年09月18日  | 移动技术网IT编程  | 我要评论

spring data redis:

要求:

  • redis 版本 > 2.6
  • 与 lettuce 或 jedis 集成,两种java开源redis库.

spring redis主要做的两件事:

  • 连接redis,不管使用哪种库,redisconnection以及redisconnectionfactory只能使用一套api进行redis连接或操作
  • 通过redistemplate操作redis数据。redistemplate 提供高层抽象的redis 交互。
iteration description
geooperation redis geospatial opertations, such as geoadd, georadius,...
hashoperations redis hash operations
hyperloglogoperations redis hyperloglog operations, such as pfadd, pfcount,...
listoperations redis list operations
setoperations redis set operations
valueoperations redis string (or value) operations
zsetoperations redis zset (or sorted set) operations
boundgeooperations redis key bound geospatial operations
boundhashoperations redis hash key bound operations
boundkeyoperations redis key bound operations
boundlistoperations redis list key bound operations
boundsetoperations redis set key bound operationsboundvalueoperations
boundzsetoperations redis zset (or sorted set) key bound operations

现在尝试一把使用spring redis。

  • gradle 配置依赖库

  • spring redis 配置,这里使用最简单的配置,配置的值,例如连接redis的端口号是默认的

  • 使用hashoperations实现前面提到的user数据类型的存储。

  • 命令行查看redis里面的数据。

粉丝和关注功能实现,这里暂时就不实现了。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网