

package com.qnfhq;

import cn.hutool.core.util.StrUtil;
import com.qnfhq.common.redis.RedisUtils;
import com.qnfhq.modules.sys.entity.SysUserEntity;
import jakarta.annotation.Resource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;


@RunWith(SpringRunner.class)
@SpringBootTest
public class RedisTest {
    @Resource
    private RedisUtils redisUtils;

    @Test
    public void contextLoads() {
        SysUserEntity user = new SysUserEntity();
        user.setEmail("123456@qq.com");
        redisUtils.set("user", user);

        System.out.println(StrUtil.toString(redisUtils.get("user")));
    }

}
