本文整理了Java中org.springframework.cache.annotation.Cacheable.<init>()
方法的一些代码示例,展示了Cacheable.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Cacheable.<init>()
方法的具体详情如下:
包路径:org.springframework.cache.annotation.Cacheable
类名称:Cacheable
方法名:<init>
暂无
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable("testCache")
public Long cacheNull(Object arg1) {
return null;
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", unless = "#result > 10")
public Long unless(int arg) {
return (long) arg;
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", sync = true)
public Object cacheSyncNull(Object arg1) {
return null;
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable
public void interfaceCacheableOverride() {
}
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable("testCache")
public Long cache(Object arg1) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", sync = true, condition = "#p0 == 3")
public Long conditionalSync(int classField) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", key = "#root.methodName + #root.method.name + #root.targetClass + #root.target")
public Long rootVars(Object arg1) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", keyGenerator = "unknownBeanName")
public Long unknownCustomKeyGenerator(Object arg1) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", cacheManager = "unknownBeanName")
public Long unknownCustomCacheManager(Object arg1) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable("testCache")
public Long nullValue(Object arg1) {
this.nullInvocations.incrementAndGet();
return null;
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", sync = true)
public Object cacheSync(Object arg1) {
return counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", keyGenerator = "unknownBeanName")
public Object unknownCustomKeyGenerator(Object arg1) {
return counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", sync = true)
public Long cacheSync(Object arg1) {
return counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", key = "#p0")
public Object key(Object arg1, Object arg2) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", cacheManager = "unknownBeanName")
public Object unknownCustomCacheManager(Object arg1) {
return this.counter.getAndIncrement();
}
代码示例来源:origin: spring-projects/spring-framework
@Cacheable(cacheNames = "cache", condition = "false")
public Object getNeverCache(String key) {
return new Object();
}
}
代码示例来源:origin: spring-projects/spring-framework
@Cacheable
public Object getSimple(String cacheName) {
return new Object();
}
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable("testCache")
public Long throwChecked(Object arg1) throws Exception {
throw new IOException(arg1.toString());
}
代码示例来源:origin: spring-projects/spring-framework
@Override
@Cacheable(cacheNames = "testCache", sync = true)
public Object throwCheckedSync(Object arg1) throws Exception {
throw new IOException(arg1.toString());
}
代码示例来源:origin: spring-projects/spring-framework
@Caching(cacheable = {
@Cacheable(cacheNames = "testCache", sync = true),
@Cacheable(cacheNames = "anotherTestCache", sync = true)
})
public Object syncWithTwoGetOperations(Object arg1) {
return this.counter.getAndIncrement();
}
}
内容来源于网络,如有侵权,请联系作者删除!