类 EnvRedisTemplate<V>

java.lang.Object
org.springframework.data.redis.core.RedisAccessor
org.springframework.data.redis.core.RedisTemplate<String,​V>
cn.nkpro.elcube.data.redis.EnvRedisTemplate<V>
类型参数:
V -
所有已实现的接口:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.InitializingBean, org.springframework.data.redis.core.RedisOperations<String,​V>

public class EnvRedisTemplate<V> extends org.springframework.data.redis.core.RedisTemplate<String,​V> implements org.springframework.beans.factory.InitializingBean
带Env前缀的RedisTemplate 为避免不同的应用环境对同一个redis库的数据进行污染,重写redis key的命名方法 在key加上env的前缀
另请参阅:
NkProperties#getEnvKey()
  • 字段概要

    从类继承的字段 org.springframework.data.redis.core.RedisAccessor

    logger
  • 构造器概要

    构造器
    构造器
    说明
    EnvRedisTemplate​(org.springframework.data.redis.connection.RedisConnectionFactory factory, String env)
     
  • 方法概要

    从类继承的方法 org.springframework.data.redis.core.RedisTemplate

    afterPropertiesSet, boundGeoOps, boundHashOps, boundListOps, boundSetOps, boundStreamOps, boundValueOps, boundZSetOps, convertAndSend, countExistingKeys, createRedisConnectionProxy, delete, delete, discard, dump, exec, exec, execRaw, execute, execute, execute, execute, execute, execute, executePipelined, executePipelined, executePipelined, executePipelined, executeWithStickyConnection, expire, expireAt, getClientList, getDefaultSerializer, getExpire, getExpire, getHashKeySerializer, getHashValueSerializer, getKeySerializer, getStringSerializer, getValueSerializer, hasKey, isEnableDefaultSerializer, isExposeConnection, keys, killClient, move, multi, opsForCluster, opsForGeo, opsForHash, opsForHyperLogLog, opsForList, opsForSet, opsForStream, opsForStream, opsForValue, opsForZSet, persist, postProcessResult, preProcessConnection, randomKey, rename, renameIfAbsent, restore, setBeanClassLoader, setDefaultSerializer, setEnableDefaultSerializer, setEnableTransactionSupport, setExposeConnection, setHashKeySerializer, setHashValueSerializer, setKeySerializer, setScriptExecutor, setStringSerializer, setValueSerializer, slaveOf, slaveOfNoOne, sort, sort, sort, sort, sort, type, unlink, unlink, unwatch, watch, watch

    从类继承的方法 org.springframework.data.redis.core.RedisAccessor

    getConnectionFactory, getRequiredConnectionFactory, setConnectionFactory

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 org.springframework.beans.factory.InitializingBean

    afterPropertiesSet

    从接口继承的方法 org.springframework.data.redis.core.RedisOperations

    restore
  • 构造器详细资料

    • EnvRedisTemplate

      public EnvRedisTemplate(org.springframework.data.redis.connection.RedisConnectionFactory factory, String env)