Skip to content

Commit e5b5052

Browse files
committed
Improve exception message
Issue: SPR-12898
1 parent 063ef24 commit e5b5052

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ public void afterSingletonsInstantiated() {
184184
}
185185
catch (NoUniqueBeanDefinitionException ex) {
186186
throw new IllegalStateException("No CacheResolver specified, and no unique bean of type " +
187-
"CacheManager found. Mark one as primary or declare a specific CacheManager to use.");
187+
"CacheManager found. Mark one as primary (or give it the name 'cacheManager') or " +
188+
"declare a specific CacheManager to use, that serves as the default one.");
188189
}
189190
catch (NoSuchBeanDefinitionException ex) {
190191
throw new IllegalStateException("No CacheResolver specified, and no bean of type CacheManager found. " +

0 commit comments

Comments
 (0)