2.Redis
一、 添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
二、 配置文件:
spring.cache.type = redis
三、 启用注解支持:
@EnableCaching:启用缓存注解
添加在main方法上面
资料
Spring Boot学习笔记——Spring Boot与Redis的集成
springboot(三):Spring boot中Redis的使用
Last updated
Was this helpful?