List of usage examples for org.springframework.cache.interceptor CacheResolver resolveCaches
Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context);
From source file:org.springframework.cache.interceptor.CacheAspectSupport.java
protected Collection<? extends Cache> getCaches(CacheOperationInvocationContext<CacheOperation> context, CacheResolver cacheResolver) { Collection<? extends Cache> caches = cacheResolver.resolveCaches(context); if (caches.isEmpty()) { throw new IllegalStateException( "No cache could be resolved for '" + context.getOperation() + "' using resolver '" + cacheResolver + "'. At least one cache should be provided per cache operation."); }// w w w. j av a 2s .c om return caches; }