|
@@ -61,8 +61,8 @@ public class RedisLock {
|
|
|
|
|
|
public void sendDataLock(String key, String value) {
|
|
|
|
|
|
- redisTemplate.opsForValue().setIfAbsent(key, value);
|
|
|
- redisTemplate.expire(key,10, TimeUnit.SECONDS);
|
|
|
+ redisTemplate.opsForValue().setIfAbsent(key, value,10,TimeUnit.SECONDS);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|