缓存配置
本文主要讲述,在Spring Boot中即成RedisTemplate 完成缓存工具类,如果要了解redis的具体信息,请参阅redis缓存
添加Redis依赖包
在项目的pom.xml中添加如下:
<!-- redis依赖包 ,版本是和项目的Spring Boot版本一至-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
大约 8 分钟