Merge pull request #12422 from igor-suhorukov

* pr/12422:
  Polish
pull/12629/head
Stephane Nicoll 7 years ago
commit 81f3f6784b

@ -1,5 +1,5 @@
/* /*
* Copyright 2012-2017 the original author or authors. * Copyright 2012-2018 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -47,16 +47,13 @@ class RedisSessionConfiguration {
public static class SpringBootRedisHttpSessionConfiguration public static class SpringBootRedisHttpSessionConfiguration
extends RedisHttpSessionConfiguration { extends RedisHttpSessionConfiguration {
private SessionProperties sessionProperties;
@Autowired @Autowired
public void customize(SessionProperties sessionProperties) { public void customize(SessionProperties sessionProperties) {
this.sessionProperties = sessionProperties; Integer timeout = sessionProperties.getTimeout();
Integer timeout = this.sessionProperties.getTimeout();
if (timeout != null) { if (timeout != null) {
setMaxInactiveIntervalInSeconds(timeout); setMaxInactiveIntervalInSeconds(timeout);
} }
SessionProperties.Redis redis = this.sessionProperties.getRedis(); SessionProperties.Redis redis = sessionProperties.getRedis();
setRedisNamespace(redis.getNamespace()); setRedisNamespace(redis.getNamespace());
setRedisFlushMode(redis.getFlushMode()); setRedisFlushMode(redis.getFlushMode());
} }

Loading…
Cancel
Save