Enabling caching

Before we can start using caching, we need to enable caching on the application. The following code snippet shows how we can enable caching:

    @EnableCaching
@SpringBootApplication
public class Application {

@EnableCaching would enable caching in a Spring Boot application.

Spring Boot automatically configures a suitable CacheManager ;framework to serve as a provider for the relevant cache. We will look at the details of how Spring Boot decides the CacheManager a little later.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset