Merge branch 'master' into 3.0.0

pull/1833/head
Nikita Koksharov 6 years ago
commit 6a8dad6a6a

@ -58,9 +58,9 @@ public class RedissonSessionRepository implements FindByIndexNameSessionReposito
private final MapSession delegate;
private RMap<String, Object> map;
public RedissonSession() {
public RedissonSession(String keyPrefix) {
this.delegate = new MapSession();
map = redisson.getMap("redisson_spring_session:" + delegate.getId());
map = redisson.getMap(keyPrefix + delegate.getId());
principalName = resolvePrincipal(delegate);
Map<String, Object> newMap = new HashMap<String, Object>(3);
@ -82,9 +82,9 @@ public class RedissonSessionRepository implements FindByIndexNameSessionReposito
}
}
public RedissonSession(String sessionId) {
public RedissonSession(String keyPrefix, String sessionId) {
this.delegate = new MapSession(sessionId);
map = redisson.getMap("redisson_spring_session:" + sessionId);
map = redisson.getMap(keyPrefix + sessionId);
principalName = resolvePrincipal(delegate);
}
@ -292,7 +292,7 @@ public class RedissonSessionRepository implements FindByIndexNameSessionReposito
@Override
public RedissonSession createSession() {
RedissonSession session = new RedissonSession();
RedissonSession session = new RedissonSession(keyPrefix);
if (defaultMaxInactiveInterval != null) {
session.setMaxInactiveInterval(Duration.ofSeconds(defaultMaxInactiveInterval));
}

Loading…
Cancel
Save