Restore ServerProperties.getSessionTimeout()
Restore the deprecated method to give people a change to migrate. The @DeprecatedConfigurationProperties annotation is now used to generate the deprecated meta-data, removing the need for manual meta-data. Closes gh-3537
This commit is contained in:
@@ -52,6 +52,7 @@ import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer;
|
||||
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
|
||||
import org.springframework.boot.context.embedded.undertow.UndertowEmbeddedServletContainerFactory;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -197,6 +198,17 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the session timeout
|
||||
* @return the session timeout
|
||||
* @deprecated since 1.3.0 in favor of {@code session.timeout}.
|
||||
*/
|
||||
@Deprecated
|
||||
@DeprecatedConfigurationProperty(replacement = "server.session.timeout")
|
||||
public Integer getSessionTimeout() {
|
||||
return this.session.getTimeout();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the session timeout
|
||||
* @param sessionTimeout the session timeout
|
||||
|
||||
@@ -161,15 +161,6 @@
|
||||
"deprecation": {
|
||||
"replacement": "spring.mvc.view.suffix"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "server.session-timeout",
|
||||
"type": "java.lang.Integer",
|
||||
"description": "Session timeout in seconds.",
|
||||
"sourceType": "org.springframework.boot.autoconfigure.web.ServerProperties",
|
||||
"deprecation": {
|
||||
"replacement": "server.session.timeout"
|
||||
}
|
||||
}
|
||||
],"hints": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user