标签:return null exec cut ext.get value exce 操作 get
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;
}
标签:return null exec cut ext.get value exce 操作 get
原文地址:https://www.cnblogs.com/junglecat/p/10026406.html