spring-projects / spring-projects/spring-boot

Rework Spring Session Redis properties to make it clearer which properties apply in which situations

Open
#42,834 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

We have 6 properties at the moment:

  • spring.session.redis.cleanup-cron
  • spring.session.redis.configure-action
  • spring.session.redis.flush-mode
  • spring.session.redis.namespace
  • spring.session.redis.repository-type
  • spring.session.redis.save-mode

Of these, two are servlet-specific:

  • spring.session.redis.cleanup-cron
  • spring.session.redis.flush-mode

And two are specific to indexed repositories:

  • spring.session.redis.cleanup-cron
  • spring.session.redis.configure-action

We should try to rework the properties and how they're handled to make this more clear. For example, we could move the servlet-specific properties into a group of their own:

  • spring.session.redis.servlet.cleanup-cron
  • spring.session.redis.servlet.flush-mode

We could also fail if an indexed-specific property is set when using the default repository type. Additionally or alternatively we could move the indexed-specific properties into their own group. This would leave us with these 6 properties:

  • spring.session.redis.servlet.indexed.cleanup-cron
  • spring.session.redis.indexed.configure-action
  • spring.session.redis.servlet.flush-mode
  • spring.session.redis.namespace
  • spring.session.redis.repository-type
  • spring.session.redis.save-mode

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 locating the Spring Session Redis property definitions and the code that handles repository type, servlet behavior, and indexed repositories. Review how the six existing properties are bound and validated. Done means the property structure and handling clearly communicate which settings apply to servlet and indexed repositories, including the behavior for incompatible settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.