From e5b505224b77bb2428ab9ca85e894a1ba51f8994 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 10 Apr 2015 09:20:51 +0200 Subject: [PATCH] Improve exception message Issue: SPR-12898 --- .../springframework/cache/interceptor/CacheAspectSupport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java index ba07727422..ecec4ffda9 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java @@ -184,7 +184,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker } catch (NoUniqueBeanDefinitionException ex) { throw new IllegalStateException("No CacheResolver specified, and no unique bean of type " + - "CacheManager found. Mark one as primary or declare a specific CacheManager to use."); + "CacheManager found. Mark one as primary (or give it the name 'cacheManager') or " + + "declare a specific CacheManager to use, that serves as the default one."); } catch (NoSuchBeanDefinitionException ex) { throw new IllegalStateException("No CacheResolver specified, and no bean of type CacheManager found. " +