From d651ebfd2dfe1c80c0ea1b93876ca7e5c186dee0 Mon Sep 17 00:00:00 2001 From: Stefan Ferstl Date: Sun, 8 May 2016 18:54:21 +0200 Subject: [PATCH] Fix CacheManager example in Javadoc Closes gh-1052 --- .../org/springframework/cache/annotation/EnableCaching.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java index 6e8147fe70..0ec602b9ea 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java @@ -47,7 +47,7 @@ import org.springframework.core.Ordered; * public CacheManager cacheManager() { * // configure and return an implementation of Spring's CacheManager SPI * SimpleCacheManager cacheManager = new SimpleCacheManager(); - * cacheManager.addCaches(Arrays.asList(new ConcurrentMapCache("default"))); + * cacheManager.setCaches(Arrays.asList(new ConcurrentMapCache("default"))); * return cacheManager; * } * } @@ -117,7 +117,7 @@ import org.springframework.core.Ordered; * public CacheManager cacheManager() { * // configure and return an implementation of Spring's CacheManager SPI * SimpleCacheManager cacheManager = new SimpleCacheManager(); - * cacheManager.addCaches(Arrays.asList(new ConcurrentMapCache("default"))); + * cacheManager.setCaches(Arrays.asList(new ConcurrentMapCache("default"))); * return cacheManager; * } *