Spring Boot provides a starter project for caching—spring-boot-starter-cache. Adding this to an application brings in all the dependencies to enable JSR 107 and Spring caching annotations. The following code snippet shows the dependency details for spring-boot-starter-cache. Let's add this to our pom.xml file:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>