导入maven依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-redis</artifactId> </dependency>
配置springboot的redis环境 application.yml 文件中
spring: redis: host: 127.0.0.1 password: port: 6379 pool: max-idle: 100 min-idle: 1 max-active: 1000 max-wait: -1
redis服务windows 下开机自启动
redis-server --service-install redis.windows.conf
手动启动redis
redis-server --service-start