org.springframework.cache.jcache.interceptor.BeanFactoryJCacheOperationSourceAdvisor Java Examples
The following examples show how to use
org.springframework.cache.jcache.interceptor.BeanFactoryJCacheOperationSourceAdvisor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProxyJCacheConfiguration.java From spring-analysis-note with MIT License | 5 votes |
@Bean(name = CacheManagementConfigUtils.JCACHE_ADVISOR_BEAN_NAME) @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public BeanFactoryJCacheOperationSourceAdvisor cacheAdvisor() { BeanFactoryJCacheOperationSourceAdvisor advisor = new BeanFactoryJCacheOperationSourceAdvisor(); advisor.setCacheOperationSource(cacheOperationSource()); advisor.setAdvice(cacheInterceptor()); if (this.enableCaching != null) { advisor.setOrder(this.enableCaching.<Integer>getNumber("order")); } return advisor; }
Example #2
Source File: ProxyJCacheConfiguration.java From java-technology-stack with MIT License | 5 votes |
@Bean(name = CacheManagementConfigUtils.JCACHE_ADVISOR_BEAN_NAME) @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public BeanFactoryJCacheOperationSourceAdvisor cacheAdvisor() { BeanFactoryJCacheOperationSourceAdvisor advisor = new BeanFactoryJCacheOperationSourceAdvisor(); advisor.setCacheOperationSource(cacheOperationSource()); advisor.setAdvice(cacheInterceptor()); if (this.enableCaching != null) { advisor.setOrder(this.enableCaching.<Integer>getNumber("order")); } return advisor; }
Example #3
Source File: ProxyJCacheConfigurationInitializer.java From spring-init with Apache License 2.0 | 5 votes |
@Override public void initialize(GenericApplicationContext context) { context.registerBean(ProxyJCacheConfiguration.class, () -> new ProxyJCacheConfiguration()); context.registerBean(BeanFactoryJCacheOperationSourceAdvisor.class, () -> context.getBean(ProxyJCacheConfiguration.class).cacheAdvisor( context.getBean(JCacheOperationSource.class), context.getBean(JCacheInterceptor.class))); context.registerBean(JCacheInterceptor.class, () -> context.getBean(ProxyJCacheConfiguration.class) .cacheInterceptor(context.getBean(JCacheOperationSource.class))); context.registerBean(JCacheOperationSource.class, () -> context.getBean(ProxyJCacheConfiguration.class).cacheOperationSource()); }
Example #4
Source File: ProxyJCacheConfiguration.java From lams with GNU General Public License v2.0 | 5 votes |
@Bean(name = CacheManagementConfigUtils.JCACHE_ADVISOR_BEAN_NAME) @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public BeanFactoryJCacheOperationSourceAdvisor cacheAdvisor() { BeanFactoryJCacheOperationSourceAdvisor advisor = new BeanFactoryJCacheOperationSourceAdvisor(); advisor.setCacheOperationSource(cacheOperationSource()); advisor.setAdvice(cacheInterceptor()); advisor.setOrder(this.enableCaching.<Integer>getNumber("order")); return advisor; }
Example #5
Source File: ProxyJCacheConfiguration.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Bean(name = CacheManagementConfigUtils.JCACHE_ADVISOR_BEAN_NAME) @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public BeanFactoryJCacheOperationSourceAdvisor cacheAdvisor() { BeanFactoryJCacheOperationSourceAdvisor advisor = new BeanFactoryJCacheOperationSourceAdvisor(); advisor.setCacheOperationSource(cacheOperationSource()); advisor.setAdvice(cacheInterceptor()); advisor.setOrder(this.enableCaching.<Integer>getNumber("order")); return advisor; }