话不多说,上代码:
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
/**
* Description: 通用Redis帮助类
* User: zhouzhou
* Date: 2018-09-05
* Time: 15:39
*/@Componentpublic
class CommonRedisHelper {
public static final String LOCK_PREFIX = "redis_lock";
public static final