Polish default Redis namespace handling

See gh-919
This commit is contained in:
Vedran Pavic
2017-11-20 09:12:53 +01:00
parent f28ab07b9a
commit 36d157a658
2 changed files with 5 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ public class ReactiveRedisOperationsSessionRepository implements
/**
* The default namespace for each key and channel in Redis used by Spring Session.
*/
public static final String DEFAULT_NAMESPACE = "spring:session:";
public static final String DEFAULT_NAMESPACE = "spring:session";
/**
* The key in the Hash representing {@link Session#getCreationTime()}.
@@ -68,14 +68,14 @@ public class ReactiveRedisOperationsSessionRepository implements
* attributeName, then there would be an entry in the hash named
* sessionAttr:attributeName that mapped to its value.
*/
static final String ATTRIBUTE_PREFIX = "attribute:";
static final String ATTRIBUTE_PREFIX = "sessionAttr:";
private final ReactiveRedisOperations<String, Object> sessionRedisOperations;
/**
* The namespace for every key used by Spring Session in Redis.
*/
private String namespace = DEFAULT_NAMESPACE;
private String namespace = DEFAULT_NAMESPACE + ":";
/**
* If non-null, this value is used to override the default value for

View File

@@ -255,7 +255,7 @@ public class RedisOperationsSessionRepository implements
/**
* The default namespace for each key and channel in Redis used by Spring Session.
*/
public static final String DEFAULT_NAMESPACE = "spring:session:";
public static final String DEFAULT_NAMESPACE = "spring:session";
/**
* The key in the Hash representing
@@ -287,7 +287,7 @@ public class RedisOperationsSessionRepository implements
/**
* The namespace for every key used by Spring Session in Redis.
*/
private String namespace = DEFAULT_NAMESPACE;
private String namespace = DEFAULT_NAMESPACE + ":";
private final RedisOperations<Object, Object> sessionRedisOperations;