22 lines
484 B
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;
|
|
}
|
|
}
|