Improve cache sample

Clarify the cache sample and in particular that Infinispan does not
bootstrap with a default configuration file. Hence the custom
`infinispan.xml` configuration is enabled by default if Infinispan is
available on the classpath.

See gh-9417
pull/7877/merge
Stephane Nicoll 8 years ago
parent 9579e95868
commit fc38c1ba4d

@ -85,9 +85,8 @@ TIP: Run sample cache application using Hazelcast with
=== Infinispan
Add the `org.infinispan:infinispan-spring4-embedded` dependency to enable support for
Infinispan. There is no default location that Infinispan uses to look for a config
file so if you don't specify anything it will bootstrap on a hardcoded default. You
can set the `spring.cache.infinispan.config` property to use the provided
`infinispan.xml` configuration instead.
file so this sample is configured to use a the provider `infinispan.xml` configuration
file specified via the `spring.cache.infinispan.config` property.
TIP: Run sample cache application using Infinispan with
`$mvn spring-boot:run -Pinfinispan`.

@ -3,7 +3,7 @@ management.security.enabled=false
#
# Infinispan configuration file location.
#
#spring.cache.infinispan.config=infinispan.xml
spring.cache.infinispan.config=infinispan.xml
#
@ -15,10 +15,10 @@ management.security.enabled=false
#
# Caffeine configuration
#
#spring.cache.caffeine.spec=maximumSize=200,expireAfterAccess=600s
spring.cache.caffeine.spec=maximumSize=200,expireAfterAccess=600s
#
# Guava configuration
#
#spring.cache.guava.spec=maximumSize=200,expireAfterAccess=600s
spring.cache.guava.spec=maximumSize=200,expireAfterAccess=600s

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<infinispan xmlns="urn:infinispan:config:7.2">
<infinispan xmlns="urn:infinispan:config:8.2">
<cache-container default-cache="default">
<local-cache name="countries" statistics="true">
<local-cache name="default"/>
<local-cache name="countries">
<eviction max-entries="200"/>
<expiration lifespan="600000"/>
</local-cache>

Loading…
Cancel
Save