SpringBoot | 集成Redis
Windows下安装:
https://github.com/MicrosoftArchive/redis/releases
zip下就解包到自定义目录下,msi就跟着步骤安装
进入安装目录下运行命令,
redis-server.exe redis.windows.conf
如上图就表示成功安装
在springboot集成redis:
doc: https://spring.io/projects/spring-data-redis
依赖:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency>
配置文件application.properties:
spring.redis.host=127.0.0.1 spring.redis.port=6379