一、 Redis Maven 引用

  1. <dependency>
  2. <groupId>org.springframework.boot</groupId>
  3. <artifactId>spring-boot-starter-data-redis</artifactId>
  4. <exclusions>
  5. <exclusion> <!-- redis的客户端驱动,使用redisclients代替这个模块 -->
  6. <groupId>io.lettuce</groupId>
  7. <artifactId>lettuce-core</artifactId>
  8. </exclusion>
  9. </exclusions>
  10. </dependency>
  11. <dependency>
  12. <groupId>redis.clients</groupId>
  13. <artifactId>jedis</artifactId>
  14. <version>2.8.1</version>
  15. </dependency>

二、Redis 认知

Redis是一种运行在内存的键值数据库,而且是以字符串存储为中心的。当前支持的多种数据类型包括:字符串,散列,链表,集合与有序集合,基数与地理位置。

image.png