org.springframework.cache.jcache.interceptor.JCacheOperationSource Java Examples
The following examples show how to use
org.springframework.cache.jcache.interceptor.JCacheOperationSource.
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: AbstractJCacheConfiguration.java From lams with GNU General Public License v2.0 | 6 votes |
@Bean(name = "jCacheOperationSource") @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public JCacheOperationSource cacheOperationSource() { DefaultJCacheOperationSource source = new DefaultJCacheOperationSource(); if (this.cacheManager != null) { source.setCacheManager(this.cacheManager); } if (this.keyGenerator != null) { source.setKeyGenerator(this.keyGenerator); } if (this.cacheResolver != null) { source.setCacheResolver(this.cacheResolver); } if (this.exceptionCacheResolver != null) { source.setExceptionCacheResolver(this.exceptionCacheResolver); } return source; }
Example #2
Source File: AbstractJCacheConfiguration.java From spring4-understanding with Apache License 2.0 | 6 votes |
@Bean(name = "jCacheOperationSource") @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public JCacheOperationSource cacheOperationSource() { DefaultJCacheOperationSource source = new DefaultJCacheOperationSource(); if (this.cacheManager != null) { source.setCacheManager(this.cacheManager); } if (this.keyGenerator != null) { source.setKeyGenerator(this.keyGenerator); } if (this.cacheResolver != null) { source.setCacheResolver(this.cacheResolver); } if (this.exceptionCacheResolver != null) { source.setExceptionCacheResolver(this.exceptionCacheResolver); } return source; }
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: AbstractJCacheConfiguration.java From spring-analysis-note with MIT License | 4 votes |
@Bean(name = "jCacheOperationSource") @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public JCacheOperationSource cacheOperationSource() { return new DefaultJCacheOperationSource( this.cacheManager, this.cacheResolver, this.exceptionCacheResolver, this.keyGenerator); }
Example #5
Source File: JCacheCustomInterceptorTests.java From spring-analysis-note with MIT License | 4 votes |
@Bean public JCacheInterceptor jCacheInterceptor(JCacheOperationSource cacheOperationSource) { JCacheInterceptor cacheInterceptor = new TestCacheInterceptor(); cacheInterceptor.setCacheOperationSource(cacheOperationSource); return cacheInterceptor; }
Example #6
Source File: AbstractJCacheConfiguration.java From java-technology-stack with MIT License | 4 votes |
@Bean(name = "jCacheOperationSource") @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public JCacheOperationSource cacheOperationSource() { return new DefaultJCacheOperationSource( this.cacheManager, this.cacheResolver, this.exceptionCacheResolver, this.keyGenerator); }
Example #7
Source File: JCacheCustomInterceptorTests.java From java-technology-stack with MIT License | 4 votes |
@Bean public JCacheInterceptor jCacheInterceptor(JCacheOperationSource cacheOperationSource) { JCacheInterceptor cacheInterceptor = new TestCacheInterceptor(); cacheInterceptor.setCacheOperationSource(cacheOperationSource); return cacheInterceptor; }
Example #8
Source File: JCacheCustomInterceptorTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Bean public JCacheInterceptor jCacheInterceptor(JCacheOperationSource cacheOperationSource) { JCacheInterceptor cacheInterceptor = new TestCacheInterceptor(); cacheInterceptor.setCacheOperationSource(cacheOperationSource); return cacheInterceptor; }