Spring security学习笔记(三)

栏目: Java · 发布时间: 7年前

内容简介:现在尝试一把使用Spring redis。粉丝和关注功能实现,这里暂时就不实现了。

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 security学习笔记(三)
  • spring redis 配置,这里使用最简单的配置,配置的值,例如连接redis的端口号是默认的

    Spring security学习笔记(三)
  • 使用HashOperations实现前面提到的user数据类型的存储。

    Spring security学习笔记(三)
  • 命令行查看redis里面的数据。

    Spring security学习笔记(三)

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


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Programming Collective Intelligence

Programming Collective Intelligence

Toby Segaran / O'Reilly Media / 2007-8-26 / USD 39.99

Want to tap the power behind search rankings, product recommendations, social bookmarking, and online matchmaking? This fascinating book demonstrates how you can build Web 2.0 applications to mine the......一起来看看 《Programming Collective Intelligence》 这本书的介绍吧!

MD5 加密
MD5 加密

MD5 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具