spring-projects / spring-projects/spring-session

Add Session HandlerMethodArgumentResolver

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It would be nice if Spring Session would provide optional integration in Spring MVC to resolve a Session argument for Spring MVC. This could be done using Spring's HandlerMethodArgumentResolver.

The argument would be resolved if the argument is of type Session (or a subclass like ExpiringSession). The value would be resolved using SessionContextHolder.getSession().

See Spring Security's CsrfTokenArgumentResolver for an example of how this might be implemented.

Blocked by: #249

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 dependency in #249, then compare Spring Security's CsrfTokenArgumentResolver with Spring MVC's HandlerMethodArgumentResolver and the SessionContextHolder usage described here. Done means Spring MVC can resolve Session and subclasses from the session context through optional Spring Session integration, with suitable coverage added where the project places resolver tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.