Improve exception message

Issue: SPR-12898
This commit is contained in:
Stephane Nicoll 2015-04-10 09:20:51 +02:00
parent 063ef240c1
commit e5b505224b
1 changed files with 2 additions and 1 deletions

View File

@ -184,7 +184,8 @@ public abstract class CacheAspectSupport extends AbstractCacheInvoker
} }
catch (NoUniqueBeanDefinitionException ex) { catch (NoUniqueBeanDefinitionException ex) {
throw new IllegalStateException("No CacheResolver specified, and no unique bean of type " + 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) { catch (NoSuchBeanDefinitionException ex) {
throw new IllegalStateException("No CacheResolver specified, and no bean of type CacheManager found. " + throw new IllegalStateException("No CacheResolver specified, and no bean of type CacheManager found. " +