本文整理汇总了Java中org.springframework.cache.interceptor.SimpleCacheErrorHandler类的典型用法代码示例。如果您正苦于以下问题:Java SimpleCacheErrorHandler类的具体用法?Java SimpleCacheErrorHandler怎么用?Java SimpleCacheErrorHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleCacheErrorHandler类属于org.springframework.cache.interceptor包,在下文中一共展示了SimpleCacheErrorHandler类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getFailProperException
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Test
public void getFailProperException() {
final UnsupportedOperationException exception = new UnsupportedOperationException(
"Test exception on get");
willThrow(exception).given(this.cache).get(0L);
this.cacheInterceptor.setErrorHandler(new SimpleCacheErrorHandler());
this.thrown.expect(is(exception));
this.simpleService.get(0L);
}
开发者ID:rajadilipkolli,项目名称:POC,代码行数:12,代码来源:CustomCacheErrorHandlerTest.java
示例2: putFailProperException
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Test
public void putFailProperException() {
final UnsupportedOperationException exception = new UnsupportedOperationException(
"Test exception on put");
willThrow(exception).given(this.cache).put(0L, 0L);
this.cacheInterceptor.setErrorHandler(new SimpleCacheErrorHandler());
this.thrown.expect(is(exception));
this.simpleService.put(0L);
}
开发者ID:rajadilipkolli,项目名称:POC,代码行数:12,代码来源:CustomCacheErrorHandlerTest.java
示例3: evictFailProperException
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Test
public void evictFailProperException() {
final UnsupportedOperationException exception = new UnsupportedOperationException(
"Test exception on evict");
willThrow(exception).given(this.cache).evict(0L);
this.cacheInterceptor.setErrorHandler(new SimpleCacheErrorHandler());
this.thrown.expect(is(exception));
this.simpleService.evict(0L);
}
开发者ID:rajadilipkolli,项目名称:POC,代码行数:12,代码来源:CustomCacheErrorHandlerTest.java
示例4: clearFailProperException
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Test
public void clearFailProperException() {
final UnsupportedOperationException exception = new UnsupportedOperationException(
"Test exception on evict");
willThrow(exception).given(this.cache).clear();
this.cacheInterceptor.setErrorHandler(new SimpleCacheErrorHandler());
this.thrown.expect(is(exception));
this.simpleService.clear();
}
开发者ID:rajadilipkolli,项目名称:POC,代码行数:12,代码来源:CustomCacheErrorHandlerTest.java
示例5: errorHandler
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Override
@Bean
public CacheErrorHandler errorHandler() {
return new SimpleCacheErrorHandler();
}
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:6,代码来源:EnableCachingTests.java
示例6: errorHandler
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Override
public CacheErrorHandler errorHandler() {
return new SimpleCacheErrorHandler();
}
开发者ID:xiangxik,项目名称:java-platform,代码行数:5,代码来源:CacheConfiguration.java
示例7: errorHandler
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Bean
@Override
public CacheErrorHandler errorHandler()
{
return new SimpleCacheErrorHandler();
}
开发者ID:FINRAOS,项目名称:herd,代码行数:7,代码来源:DaoSpringModuleConfig.java
示例8: errorHandler
import org.springframework.cache.interceptor.SimpleCacheErrorHandler; //导入依赖的package包/类
@Override
public CacheErrorHandler errorHandler() {
return new SimpleCacheErrorHandler();
}
开发者ID:hortonworks,项目名称:cloudbreak,代码行数:5,代码来源:CachingConfig.java
注:本文中的org.springframework.cache.interceptor.SimpleCacheErrorHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论