spring-projects / spring-projects/spring-session

Document How to Use Custom sessionRepository with @EnableRedisHttpSessionConfiguration

Open
#114 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: docs
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

@EnableRedisHttpSessionConfiguration
public class HttpSessionConfig {
    @Value("${server.session-timeout}")
    private int maxInactiveIntervalInSeconds;

    @Primary
    @Bean
    public RedisOperationsSessionRepository sessionRepository(RedisTemplate<String, ExpiringSession> sessionRedisTemplate) {
        RedisOperationsSessionRepository sessionRepository = new RedisOperationsSessionRepository(sessionRedisTemplate);
        // customize
        sessionRepository.setDefaultMaxInactiveInterval(maxInactiveIntervalInSeconds);
        return sessionRepository;
    }
}

Related Issues #110

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the custom sessionRepository example in the issue and the discussion in related issue #110. Identify the Spring Session documentation section covering @EnableRedisHttpSessionConfiguration, then document how to customize and register the repository; done means the supported configuration is explained clearly with an example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.