Void void Void用在泛型
生活随笔
收集整理的這篇文章主要介紹了
Void void Void用在泛型
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
public Void setStr(String key,String value)throws Exception{
RetryTemplate retryTemplate=initRetryTemplate();
retryTemplate.execute(new RetryCallback<Void,Exception>() {
int i = 0;
// 重試操作
@Override
public Void doWithRetry(RetryContext retryContext) throws Exception {
log.info("retry count: {}", retryContext.getRetryCount());
stringRedisTemplate.opsForValue().set(key,value);
// return len(i++);
return null;
}
});
return null;
}
RetryTemplate retryTemplate=initRetryTemplate();
retryTemplate.execute(new RetryCallback<Void,Exception>() {
int i = 0;
// 重試操作
@Override
public Void doWithRetry(RetryContext retryContext) throws Exception {
log.info("retry count: {}", retryContext.getRetryCount());
stringRedisTemplate.opsForValue().set(key,value);
// return len(i++);
return null;
}
});
return null;
}
轉載于:https://www.cnblogs.com/junglecat/p/10026406.html
總結
以上是生活随笔為你收集整理的Void void Void用在泛型的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【markdown】图片的处理
- 下一篇: JQuery/JS select标签动