Spring Framework BeanFactoryCacheOperationSourceAdvisor - 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 BeanFactoryCacheOperationSourceAdvisor class.

This code example shows how to use the following methods:setCacheOperationSource, setAdvice, setOrder
public class ProxyCachingConfiguration extends AbstractCachingConfiguration<CachingConfigurer> { 
 
	@Bean(name = CacheManagementConfigUtils.CACHE_ADVISOR_BEAN_NAME) 
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE) 
	public BeanFactoryCacheOperationSourceAdvisor cacheAdvisor() { 
		BeanFactoryCacheOperationSourceAdvisor advisor = 
				new BeanFactoryCacheOperationSourceAdvisor(); 
		advisor.setCacheOperationSource(cacheOperationSource()); 
		advisor.setAdvice(cacheInterceptor()); 
		advisor.setOrder(this.enableCaching.<Integer>getNumber("order")); 
		return advisor; 
	} 
 
	@Bean 
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE) 
	public CacheOperationSource cacheOperationSource() { 
		return new AnnotationCacheOperationSource(); 
	} 
 
	@Bean 
8
CodeRank
See Code Examples for Spring Framework BeanFactoryCacheOperationSourceAdvisor Methods: