diff --git a/spring-boot-samples/spring-boot-sample-cache/README.adoc b/spring-boot-samples/spring-boot-sample-cache/README.adoc index 6956f74b1a5..0420e9eaf49 100644 --- a/spring-boot-samples/spring-boot-sample-cache/README.adoc +++ b/spring-boot-samples/spring-boot-sample-cache/README.adoc @@ -46,10 +46,13 @@ compliant implementation and the JSR-107 api. You first need to add * `Hazelcast`: add `com.hazelcast:hazelcast` * `Infinispan`: add `org.infinispan:infinispan-jcache` -TIP: Certain cache providers do not create a default cache on-the-fly if it does not -exist so you might need to update the sample to create the caches on startup or -specify the location to the provider-specific file via the -`spring.cache.jcache.config` property. +TIP: Run sample cache application using JCache and EhCache3 by uncommenting the +`spring.cache.jcache.config` property and `$mvn spring-boot:run -Pehcache`. + +TIP: Refer to the documentation of the JSR-107 implementation you want to use: certain +cache providers do not create a default cache on-the-fly if it does not exist so you might +need to update the sample to create the caches on startup or specify the location to the +provider-specific file via the `spring.cache.jcache.config` property. NOTE: Any other JSR-107 compliant provider is also supported but Spring Boot may not offer a dependency management entry for it. You will have to add it with the version diff --git a/spring-boot-samples/spring-boot-sample-cache/pom.xml b/spring-boot-samples/spring-boot-sample-cache/pom.xml index 517230bc2da..148f23c8e8c 100644 --- a/spring-boot-samples/spring-boot-sample-cache/pom.xml +++ b/spring-boot-samples/spring-boot-sample-cache/pom.xml @@ -45,15 +45,6 @@ - - jcache - - - javax.cache - cache-api - - - caffeine diff --git a/spring-boot-samples/spring-boot-sample-cache/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-cache/src/main/resources/application.properties index e6f15711222..7375d2ab197 100644 --- a/spring-boot-samples/spring-boot-sample-cache/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-cache/src/main/resources/application.properties @@ -3,13 +3,13 @@ management.endpoints.web.exposure.include=* # # Infinispan configuration file location. # -spring.cache.infinispan.config=infinispan.xml +spring.cache.infinispan.config=classpath:infinispan.xml # # JCache configuration (example with ehcache 3). # -#spring.cache.jcache.config=ehcache3.xml +#spring.cache.jcache.config=classpath:ehcache3.xml #