Skip to content

Instantly share code, notes, and snippets.

View bilalkaun's full-sized avatar

Bilal Kaun bilalkaun

View GitHub Profile
@bilalkaun
bilalkaun / JDBCSessionPostConfig.java
Created December 2, 2020 23:26
Setting Timeout in JDBCSession From Properties
@Configuration
public class JDBCSessionPostConfig
{
private final Integer serverTimeout;
private final JdbcOperationsSessionRepository jdbcOperationsSessionRepository;
private final static int DEFAULT_TIMEOUT_IN_SECONDS = 1800; // 30 minutes
public JDBCSessionPostConfig(@Value("${server.session.timeout:"+DEFAULT_TIMEOUT_IN_SECONDS+"}") Integer serverTimeout,
JdbcOperationsSessionRepository jdbcOperationsSessionRepository)
{