|  |  |  | 
|---|
|  |  |  | package com.xcong.excoin; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.xcong.excoin.modules.member.dao.MemberDao; | 
|---|
|  |  |  | import com.xcong.excoin.modules.member.entity.MemberEntity; | 
|---|
|  |  |  | import com.xcong.excoin.utils.RedisUtils; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.junit.jupiter.api.Test; | 
|---|
|  |  |  | import org.springframework.boot.test.context.SpringBootTest; | 
|---|
|  |  |  | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @Test | 
|---|
|  |  |  | public void redisResetTest() { | 
|---|
|  |  |  | MemberEntity member = memberDao.selectById(72L); | 
|---|
|  |  |  | redisUtils.set("app_893e3963d1fe4be3b047d4a6e5f99ca9", member); | 
|---|
|  |  |  | member.setPassword(new BCryptPasswordEncoder().encode(member.getPassword())); | 
|---|
|  |  |  | redisUtils.set("app_21c8fb68f5de4bbfb91a03813833db8a", JSONObject.toJSONString(member), 36000); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|