I think you may need to use spring jdbc session or redis session so that you can have full control over session store.
Spring boot jdbc session gives a bean
@Autowired
JdbcOperationsSessionRepository sessionRepository;
using that we can set idle timeout from controller.
Just add the dependencies and and add @EnableJdbcHttpSession for your configuration.
http://docs.spring.io/spring-session/docs/current/reference/html5/guides/httpsession-jdbc-boot.html#httpsession-jdbc-boot-sample
But looks like session tables are not created automatically, You man need to create tables manually. you can find statements in
org/springframework/session/jdbc/schema-*.sql
http://docs.spring.io/spring-session/docs/current/api/org/springframework/session/jdbc/JdbcOperationsSessionRepository.html
Edit: 1
Even if jdbc session provided a way to set global default timeout, i found it is not working properly. seems only solution is to set session timeout when user login first using following code.
session.setMaxInactiveInterval(120);