Caching Data with Spring This guide walks you through the process of enabling caching on a Spring managed bean. What you’ll build You’ll build an application that enables caching on a simple book repository. What you’ll need About 15 minutes A favori
只要加入spring-boot-starter-data-redis , springboot 会自动识别并使用redis作为缓存容器,使用方式如下 gradle加入依赖 compile("org.springframework.boot:spring-boot-starter-data-redis:${springBootVersion}") redis configuration 中启用缓存 @Configuration @EnableCaching public class Re