Skip to content

Document using MockMvc with SessionRepositoryFilter - #4122

Open
matheuslealpa wants to merge 1 commit into
spring-projects:4.0.xfrom
matheuslealpa:gh-2037
Open

matheuslealpa wants to merge 1 commit into
spring-projects:4.0.xfrom
matheuslealpa:gh-2037

Conversation

@matheuslealpa

Copy link
Copy Markdown

Adds a "Testing with MockMvc" section to the HttpSession docs. It explains that a session provided through MockHttpServletRequestBuilder#session is ignored when SessionRepositoryFilter is in the chain, and shows how to send the SESSION cookie for an existing session instead. The snippet comes from a new docs test, MockMvcSessionTests, which also verifies the MockMvc session is ignored.

Targets 4.0.x as the oldest supported branch.

Closes gh-2037

Closes spring-projectsgh-2037

Signed-off-by: Matheus Leal <matheuslealpa@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants