I have created a SpringBoot MVC/Security app 1.2.2.RELEASE and my application.properties contains server settings like
#Tomcat port and contextPath details
s
(This applies to Spring 1.5.x at the time of this writing)
Note that if you're using Redis session @EnableRedisHttpSession (such as in the other comment @Phoebe Li's case), then the application property server.session won't be applied. You'll have to set it manually by code like this:
@EnableRedisHttpSession
public class HttpSessionConfig {
@Bean
public RedisOperationsSessionRepository sessionRepository(RedisConnectionFactory factory) {
RedisOperationsSessionRepository sessionRepository = new RedisOperationsSessionRepository(factory);
//Set the TTL of redis' key, which in turn will expire session when TTL is reached
sessionRepository.setDefaultMaxInactiveInterval(15); //e.g. 15 seconds
return sessionRepository;
}I
}