Commit 84e200fb by 111-PC\111

[+]代码规范

1 parent 05ba7a3b
......@@ -3,6 +3,7 @@ package cn.com.glsx.smartdevice.redis;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.data.redis.core.*;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
......@@ -24,6 +25,7 @@ public class RedisService {
public void set(String key, Object value) {
ValueOperations valueOperations = redisTemplate.opsForValue();
redisTemplate.setDefaultSerializer(RedisSerializer.string());
valueOperations.set(key, value);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!