+ renamed charset to encoding
This commit is contained in:
@@ -38,7 +38,7 @@ public interface RedisConnection extends RedisCommands, RedisHashCommands, Redis
|
||||
|
||||
Object getNativeConnection();
|
||||
|
||||
String getCharset();
|
||||
String getEncoding();
|
||||
|
||||
/**
|
||||
* Indicates whether the connection is in "queue"(or "MULTI") mode or not.
|
||||
|
||||
@@ -82,7 +82,7 @@ public class JedisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCharset() {
|
||||
public String getEncoding() {
|
||||
return "UTF-8";
|
||||
}
|
||||
|
||||
|
||||
@@ -31,11 +31,11 @@ import org.springframework.datastore.redis.core.connection.RedisConnection;
|
||||
public class JredisConnection implements RedisConnection {
|
||||
|
||||
private final JRedis jredis;
|
||||
private final String charset;
|
||||
private final String encoding;
|
||||
|
||||
public JredisConnection(JRedis jredis, String charset) {
|
||||
public JredisConnection(JRedis jredis, String encoding) {
|
||||
this.jredis = jredis;
|
||||
this.charset = charset;
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
protected DataAccessException convertJedisAccessException(Exception ex) {
|
||||
@@ -52,8 +52,8 @@ public class JredisConnection implements RedisConnection {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCharset() {
|
||||
return charset;
|
||||
public String getEncoding() {
|
||||
return encoding;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -117,7 +117,7 @@ public class JredisConnectionFactory implements InitializingBean, DisposableBean
|
||||
|
||||
@Override
|
||||
public RedisConnection getConnection() {
|
||||
return new JredisConnection((usePool ? pool : new JRedisClient(connectionSpec)));
|
||||
return new JredisConnection((usePool ? pool : new JRedisClient(connectionSpec)), getEncoding());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user