package com.elab.redis.spring;

import com.elab.redis.CacheTemplate;
import com.elab.redis.RedisSpringBoot;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.concurrent.TimeUnit;

/**
 * springData
 *
 * @author ： liukx
 * @time ： 2020/7/15 - 11:12
 */
public class SpringDataTest extends RedisSpringBoot {

    @Autowired
    private CacheTemplate cacheTemplate;

    @Test
    public void set() {
        cacheTemplate.string().set("lkx", "123", 10, TimeUnit.SECONDS);
    }
}
