添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
在 application.properties文件中配置redis
#配置redis
spring.redis.host=localhost
spring.redis.password=111111
spring.redis.port=6379
网友评论