Browse Source

Fix CacheManager example in Javadoc

Closes gh-1052
pull/1061/head
Stefan Ferstl 9 years ago committed by Stephane Nicoll
parent
commit
d651ebfd2d
  1. 4
      spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java

4
spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java vendored

@ -47,7 +47,7 @@ import org.springframework.core.Ordered;
* public CacheManager cacheManager() { * public CacheManager cacheManager() {
* // configure and return an implementation of Spring's CacheManager SPI * // configure and return an implementation of Spring's CacheManager SPI
* SimpleCacheManager cacheManager = new SimpleCacheManager(); * SimpleCacheManager cacheManager = new SimpleCacheManager();
* cacheManager.addCaches(Arrays.asList(new ConcurrentMapCache("default"))); * cacheManager.setCaches(Arrays.asList(new ConcurrentMapCache("default")));
* return cacheManager; * return cacheManager;
* } * }
* }</pre> * }</pre>
@ -117,7 +117,7 @@ import org.springframework.core.Ordered;
* public CacheManager cacheManager() { * public CacheManager cacheManager() {
* // configure and return an implementation of Spring's CacheManager SPI * // configure and return an implementation of Spring's CacheManager SPI
* SimpleCacheManager cacheManager = new SimpleCacheManager(); * SimpleCacheManager cacheManager = new SimpleCacheManager();
* cacheManager.addCaches(Arrays.asList(new ConcurrentMapCache("default"))); * cacheManager.setCaches(Arrays.asList(new ConcurrentMapCache("default")));
* return cacheManager; * return cacheManager;
* } * }
* *

Loading…
Cancel
Save