mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
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:
parent
d6a424f94c
commit
091478e0fd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user