Disable ehcache statistics if necessary
`EhCacheStatisticsProvider` uses the `StatisticsGateway` API introduced in ehcache 2.7 (march 2013). If an older ehcache version is present, we should back-off as this class is not available. Closes gh-4621
This commit is contained in:
@@ -21,6 +21,7 @@ import javax.cache.Caching;
|
||||
import com.hazelcast.core.IMap;
|
||||
import com.hazelcast.spring.cache.HazelcastCache;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
import net.sf.ehcache.statistics.StatisticsGateway;
|
||||
import org.infinispan.spring.provider.SpringCache;
|
||||
|
||||
import org.springframework.boot.actuate.cache.CacheStatistics;
|
||||
@@ -72,7 +73,7 @@ public class CacheStatisticsAutoConfiguration {
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnClass({ EhCacheCache.class, Ehcache.class })
|
||||
@ConditionalOnClass({ EhCacheCache.class, Ehcache.class, StatisticsGateway.class })
|
||||
static class EhCacheCacheStatisticsProviderConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
Reference in New Issue
Block a user