org.springframework.cache.interceptor.SimpleCacheResolver Java Examples
The following examples show how to use
org.springframework.cache.interceptor.SimpleCacheResolver.
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: DefaultJCacheOperationSource.java From spring-analysis-note with MIT License | 5 votes |
@Override protected CacheResolver getDefaultCacheResolver() { if (getCacheResolver() == null) { this.cacheResolver = SingletonSupplier.of(new SimpleCacheResolver(getDefaultCacheManager())); } return getCacheResolver(); }
Example #2
Source File: JCacheJavaConfigTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void emptyConfigSupport() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class); DefaultJCacheOperationSource cos = context.getBean(DefaultJCacheOperationSource.class); assertNotNull(cos.getCacheResolver()); assertEquals(SimpleCacheResolver.class, cos.getCacheResolver().getClass()); assertSame(context.getBean(CacheManager.class), ((SimpleCacheResolver) cos.getCacheResolver()).getCacheManager()); assertNull(cos.getExceptionCacheResolver()); context.close(); }
Example #3
Source File: DefaultJCacheOperationSource.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Override protected CacheResolver getDefaultCacheResolver() { if (this.cacheResolver == null) { this.cacheResolver = new SimpleCacheResolver(getDefaultCacheManager()); } return this.cacheResolver; }
Example #4
Source File: EnableCachingTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void emptyConfigSupport() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class); CacheInterceptor ci = context.getBean(CacheInterceptor.class); assertNotNull(ci.getCacheResolver()); assertEquals(SimpleCacheResolver.class, ci.getCacheResolver().getClass()); assertSame(context.getBean(CacheManager.class), ((SimpleCacheResolver)ci.getCacheResolver()).getCacheManager()); context.close(); }
Example #5
Source File: DefaultJCacheOperationSource.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected CacheResolver getDefaultCacheResolver() { if (this.cacheResolver == null) { this.cacheResolver = new SimpleCacheResolver(getDefaultCacheManager()); } return this.cacheResolver; }
Example #6
Source File: AspectJEnableCachingIsolatedTests.java From java-technology-stack with MIT License | 5 votes |
@Test @Ignore("AspectJ has some sort of caching that makes this one fail") public void emptyConfigSupport() { load(EmptyConfigSupportConfig.class); AnnotationCacheAspect aspect = this.ctx.getBean(AnnotationCacheAspect.class); assertNotNull(aspect.getCacheResolver()); assertEquals(SimpleCacheResolver.class, aspect.getCacheResolver().getClass()); assertSame(this.ctx.getBean(CacheManager.class), ((SimpleCacheResolver) aspect.getCacheResolver()).getCacheManager()); }
Example #7
Source File: JCacheJavaConfigTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void emptyConfigSupport() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class); DefaultJCacheOperationSource cos = context.getBean(DefaultJCacheOperationSource.class); assertNotNull(cos.getCacheResolver()); assertEquals(SimpleCacheResolver.class, cos.getCacheResolver().getClass()); assertSame(context.getBean(CacheManager.class), ((SimpleCacheResolver) cos.getCacheResolver()).getCacheManager()); assertNull(cos.getExceptionCacheResolver()); context.close(); }
Example #8
Source File: DefaultJCacheOperationSource.java From java-technology-stack with MIT License | 5 votes |
@Override protected CacheResolver getDefaultCacheResolver() { if (getCacheResolver() == null) { this.cacheResolver = SingletonSupplier.of(new SimpleCacheResolver(getDefaultCacheManager())); } return getCacheResolver(); }
Example #9
Source File: EnableCachingTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void emptyConfigSupport() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class); CacheInterceptor ci = context.getBean(CacheInterceptor.class); assertNotNull(ci.getCacheResolver()); assertEquals(SimpleCacheResolver.class, ci.getCacheResolver().getClass()); assertSame(context.getBean(CacheManager.class), ((SimpleCacheResolver)ci.getCacheResolver()).getCacheManager()); context.close(); }
Example #10
Source File: AspectJEnableCachingIsolatedTests.java From spring-analysis-note with MIT License | 5 votes |
@Test @Ignore("AspectJ has some sort of caching that makes this one fail") public void emptyConfigSupport() { load(EmptyConfigSupportConfig.class); AnnotationCacheAspect aspect = this.ctx.getBean(AnnotationCacheAspect.class); assertNotNull(aspect.getCacheResolver()); assertEquals(SimpleCacheResolver.class, aspect.getCacheResolver().getClass()); assertSame(this.ctx.getBean(CacheManager.class), ((SimpleCacheResolver) aspect.getCacheResolver()).getCacheManager()); }
Example #11
Source File: JCacheJavaConfigTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void emptyConfigSupport() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class); DefaultJCacheOperationSource cos = context.getBean(DefaultJCacheOperationSource.class); assertNotNull(cos.getCacheResolver()); assertEquals(SimpleCacheResolver.class, cos.getCacheResolver().getClass()); assertSame(context.getBean(CacheManager.class), ((SimpleCacheResolver) cos.getCacheResolver()).getCacheManager()); assertNull(cos.getExceptionCacheResolver()); context.close(); }
Example #12
Source File: EnableCachingTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void emptyConfigSupport() { ConfigurableApplicationContext context = new AnnotationConfigApplicationContext(EmptyConfigSupportConfig.class); CacheInterceptor ci = context.getBean(CacheInterceptor.class); assertNotNull(ci.getCacheResolver()); assertEquals(SimpleCacheResolver.class, ci.getCacheResolver().getClass()); assertSame(context.getBean(CacheManager.class), ((SimpleCacheResolver)ci.getCacheResolver()).getCacheManager()); context.close(); }
Example #13
Source File: JCacheJavaConfigTests.java From java-technology-stack with MIT License | 4 votes |
@Override @Bean public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #14
Source File: JCacheJavaConfigTests.java From java-technology-stack with MIT License | 4 votes |
@Override @Bean public CacheResolver exceptionCacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #15
Source File: JCacheJavaConfigTests.java From spring-analysis-note with MIT License | 4 votes |
@Override @Bean public CacheResolver exceptionCacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #16
Source File: JCacheJavaConfigTests.java From spring-analysis-note with MIT License | 4 votes |
@Override @Bean public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #17
Source File: JCacheJavaConfigTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override @Bean public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #18
Source File: JCacheJavaConfigTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
@Override @Bean public CacheResolver exceptionCacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #19
Source File: CacheConfiguration.java From java-platform with Apache License 2.0 | 4 votes |
@Override public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #20
Source File: CachingConfig.java From cloudbreak with Apache License 2.0 | 4 votes |
@Override public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #21
Source File: CachingConfig.java From cloudbreak with Apache License 2.0 | 4 votes |
@Override public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }
Example #22
Source File: CachingConfig.java From cloudbreak with Apache License 2.0 | 4 votes |
@Override public CacheResolver cacheResolver() { return new SimpleCacheResolver(cacheManager()); }