Spring Framework CachingConfigurerSupport - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework CachingConfigurerSupport class.

This code example shows how to use the following methods:
 * @author Stephane Nicoll 
 * @since 4.1 
 * @see JCacheConfigurer 
 * @see CachingConfigurerSupport 
 */ 
public class JCacheConfigurerSupport extends CachingConfigurerSupport implements JCacheConfigurer { 
 
	@Override 
	public CacheResolver exceptionCacheResolver() { 
		return null; 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
	} 
 
 
	@Configuration 
	@EnableCaching 
	static class EnableCachingConfig extends CachingConfigurerSupport {
 
		@Override 
		@Bean 
		public org.springframework.cache.CacheManager cacheManager() {
			return new JCacheCacheManager(jCacheManager()); 
		} 
 
		@Bean 
		public CacheManager jCacheManager() {
			CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();
			MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<Object, Object>();
			mutableConfiguration.setStoreByValue(false);  // otherwise value has to be Serializable
			cacheManager.createCache("testCache", new JCacheConfiguration<Object, Object>(mutableConfiguration));
			cacheManager.createCache("primary", new JCacheConfiguration<Object, Object>(mutableConfiguration));
6
CodeRank
This code example shows how to use the following methods:
	} 
 
 
	@Configuration 
	@EnableCaching 
	static class Config extends CachingConfigurerSupport {
 
		@Bean 
		@Override 
		public CacheErrorHandler errorHandler() {
			return mock(CacheErrorHandler.class);
		} 
 
		@Bean 
		public SimpleService simpleService() { 
			return new SimpleService(); 
		} 
 
		@Bean 
		public CacheManager cacheManager() {
5
CodeRank
This code example shows how to use the following methods:
 
@Configuration 
@ComponentScan(basePackages = { "ch.rasc.caching.spring" }) 
@EnableCaching 
// (mode = AdviceMode.ASPECTJ) 
public class Config extends CachingConfigurerSupport { 
 
	@Bean 
	@Override 
	public CacheManager cacheManager() { 
		return new ConcurrentMapCacheManager("calculator", "anotherCache"); 
	} 
 
	@Override 
	public KeyGenerator keyGenerator() { 
		return new SimpleKeyGenerator(); 
	} 
 
} 
4
CodeRank