load-center/src/main/java/com/muyu/gateway/cache/abs/GatewayCacheAbs.java

23 lines
462 B
Java

package com.muyu.gateway.cache.abs;
import com.muyu.common.redis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Author: DongZeLiang
* @date: 2024/4/18
* @Description: 缓存抽象类
* @Version: 1.0
*/
public abstract class GatewayCacheAbs<K> {
@Autowired
public RedisService redisService;
public abstract String getPre();
public String encode(K key){
return getPre() + key;
}
}