fix Redis instance
This commit is contained in:
@@ -3,6 +3,9 @@ package com.imyeyu.spring.util;
|
||||
import com.imyeyu.java.TimiJava;
|
||||
import com.imyeyu.java.bean.timi.TimiException;
|
||||
import com.imyeyu.spring.config.AbstractRedisConfig;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.data.redis.connection.RedisConnection;
|
||||
import org.springframework.data.redis.core.Cursor;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
@@ -27,7 +30,13 @@ import java.util.function.Consumer;
|
||||
* @author 夜雨
|
||||
* @version 2021-11-21 09:58
|
||||
*/
|
||||
public record Redis<K, V>(RedisTemplate<K, V> redis, RedisSerializer<K> serializer) {
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Redis<K, V> {
|
||||
|
||||
private RedisTemplate<K, V> redis;
|
||||
private RedisSerializer<K> serializer;
|
||||
|
||||
/**
|
||||
* 加锁
|
||||
|
||||
Reference in New Issue
Block a user