Commit 97b0a568 by QIANGLU

up config util

parent 8ba9ef76
package com.secoo.mall.redis.helper;
import com.alibaba.fastjson.support.spring.FastJsonRedisSerializer;
import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
import com.secoo.mall.common.util.colletion.CollectionUtil;
import com.secoo.mall.common.util.string.StringUtil;
......@@ -12,7 +11,6 @@ import org.springframework.data.redis.connection.jedis.JedisClusterConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.types.Expiration;
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
......@@ -26,6 +24,7 @@ import java.util.concurrent.TimeUnit;
*/
@Data
@Deprecated
public class RedisHelper {
private final String MUTEX_KEY = "mutex";
private final static RedisSerializer DEFAULT_STRING_SERIALIZER = new StringRedisSerializer();
......
......@@ -5,16 +5,14 @@ import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.*;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
* @author QIANG
* @since 2.0.1 Deprecated。推荐使用RedisHelper
* @since 2.0.1
*/
@Deprecated
public class MatrixRedisClusterUtils {
private static MatrixRedisClusterUtils cacheUtils;
......
......@@ -15,8 +15,6 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.net.UnknownHostException;
/**
* Created by QIANG
......@@ -50,7 +48,6 @@ public class MatrixeRedisAutoConfiguration {
*/
@Bean
@ConditionalOnMissingBean(MatrixRedisClusterUtils.class)
@Deprecated
public MatrixRedisClusterUtils jedisClusterUtils(RedisTemplate redisTemplate) {
RedisSerializer stringSerializer = new StringRedisSerializer();
redisTemplate.setKeySerializer(stringSerializer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment