Commit a754b791 authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '2.2.x' into 2.3.x

Closes gh-23750
parents dd74810c 11bc62fb
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -22,8 +22,6 @@ import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.web.ServerProperties;
......@@ -64,13 +62,6 @@ public class SessionProperties {
this.serverProperties = serverProperties.getIfUnique();
}
@PostConstruct
public void checkSessionTimeout() {
if (this.timeout == null && this.serverProperties != null) {
this.timeout = this.serverProperties.getServlet().getSession().getTimeout();
}
}
public StoreType getStoreType() {
return this.storeType;
}
......@@ -85,7 +76,8 @@ public class SessionProperties {
* @see Session#getTimeout()
*/
public Duration getTimeout() {
return this.timeout;
return (this.timeout == null && this.serverProperties != null)
? this.serverProperties.getServlet().getSession().getTimeout() : this.timeout;
}
public void setTimeout(Duration timeout) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment