package com.dtok.framework.util;

import cn.hutool.db.nosql.redis.RedisDS;
import cn.hutool.json.JSONUtil;
import cn.hutool.setting.Setting;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;


/**
 * redis工具类
 *
 * @author Thomas
 * @since 2021-08-13
 */
@Slf4j
@Component
@Data
public class RedisUtil {

    private static Jedis instance;

    public static Jedis getInstance() {
        if (instance == null) {
            instance = RedisDS.create().getJedis();
        }
        return instance;
    }
}