Spring Boot 2 Cache¶
Ehcache 3.x¶
- Maven dependencies
- Older spring boot versions support
ehcache 2.x
available under net.sf.ehcache package. - New versions of Spring boot support
ehcache 3.x
available under org.ehcache package.
- Older spring boot versions support
application.properties
spring.cache.jcache.config=classpath:ehcache.xml
ehcache.xml
- Find the complete list of attributes in the ehcache documentation.
CacheEventListener
:CustomCacheEventListener
@EnableCaching
:CacheConfig
@Cacheable
Annotation:EmployeeManager
- Spring CacheManager API
- Spring boot ehcache 3 example – demo
Employee
EhcacheController