pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
If you go through various things, `spring.session.timeout``` will have the value of
`server.servlet.session.timeout (`` server.session.timeout
in the 1st system) It says that it will be set. How is this done? I thought, so I read the code of the relevant part.
SessionProperties
package org.springframework.boot.autoconfigure.session;
@ConfigurationProperties(prefix = "spring.session")
public class SessionProperties {
//(Omitted)
public SessionProperties(ObjectProvider<ServerProperties> serverProperties) {
ServerProperties properties = serverProperties.getIfUnique();
Session session = (properties == null ? null
: properties.getServlet().getSession());
this.timeout = (session == null ? null : session.getTimeout());
}
Nothing happens, I set the value of `ServerPropertie.getServlet (). GetSession (). GetTimeout ()`
to `` `timeoutin the constructor of
SessionProperties``` It was just.
Recommended Posts