参考链接:https://blog.csdn.net/zyp1376308302/article/details/84257606

参开链接2:https://www.cnblogs.com/guanbin-529/p/9180840.html

略有闲暇,准备深入下Redis

下载与安装:

1. 官网http://redis.io/ 下载最新的稳定版本,这里是5.0.0

 2. 将解压后的文件放入指定目录

 3. 终端进入解压后的目录

 4. sudo make test 测试编译 

 5. sudo make install //安装redis

如果在第5步测试时报如下错:

Executing test client: couldn't execute "src/redis-benchmark": no such file or directory.

则执行以下两个步骤

1.sudo make distclean

2.sudo make

启动:

redis-server //启动命令

cmd+n 开启新的终端

redis-cli //测试客户端程序

使用-语法:
http://redisdoc.com/string/set.html

使用-spring data

官网:https://docs.spring.io/spring-data/redis/docs/2.1.5.RELEASE/reference/html/#get-started

参考文档:https://blog.csdn.net/winter_chen001/article/details/80614331

demo:https://download.csdn.net/download/the_fool_/10992866

依赖:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-pool2</artifactId>
</dependency>
、