parent
c7a11e1192
commit
22b99a90de
|
@ -65,8 +65,7 @@ public class SessionProperties {
|
|||
@PostConstruct
|
||||
public void checkSessionTimeout() {
|
||||
if (this.timeout == null && this.serverProperties != null) {
|
||||
Session session = this.serverProperties.getServlet().getSession();
|
||||
this.timeout = (session == null ? null : session.getTimeout());
|
||||
this.timeout = this.serverProperties.getServlet().getSession().getTimeout();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,6 +86,10 @@ public class SessionProperties {
|
|||
return this.timeout;
|
||||
}
|
||||
|
||||
public void setTimeout(Duration timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public Servlet getServlet() {
|
||||
return this.servlet;
|
||||
}
|
||||
|
@ -95,10 +98,6 @@ public class SessionProperties {
|
|||
this.servlet = servlet;
|
||||
}
|
||||
|
||||
public void setTimeout(Duration timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
/**
|
||||
* Servlet-related properties.
|
||||
*/
|
||||
|
|
|
@ -6015,7 +6015,8 @@ the name of the table for the JDBC store, as shown in the following example:
|
|||
----
|
||||
|
||||
For setting the timeout of the session you can use the `spring.session.timeout` property.
|
||||
If that property is not set, the auto-configuration will fallback to the value of `server.servlet.session.timeout`.
|
||||
If that property is not set, the auto-configuration fallbacks to the value of
|
||||
`server.servlet.session.timeout`.
|
||||
|
||||
[[boot-features-jmx]]
|
||||
== Monitoring and Management over JMX
|
||||
|
|
Loading…
Reference in New Issue