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学习笔记(三)

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


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

查看所有标签

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

Web Development Recipes

Web Development Recipes

Brian P. Hogan、Chris Warren、Mike Weber、Chris Johnson、Aaron Godin / Pragmatic Bookshelf / 2012-1-22 / USD 35.00

You'll see a full spectrum of cutting-edge web development techniques, from UI and eye candy recipes to solutions for data analysis, testing, and web hosting. Make buttons and content stand out with s......一起来看看 《Web Development Recipes》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

在线进制转换器
在线进制转换器

各进制数互转换器

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具