first-group-loadcenter/src/main/java/com/loadcenter/gateway/cache/abs/GatewayCacheAbs.java

22 lines
484 B
Java

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