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;
}

猜你喜欢

转载自www.cnblogs.com/junglecat/p/10026406.html
今日推荐