Skip to content

Conversation

JohnNiang
Copy link
Contributor

This PR moves the SwitchUserGrantedAuthorityMixIn annotations into WebJackson2Module instead of WebServlet Jackson2Module to fix the deserialization problem of SwitchUserGrantedAuthority in Webflux.

Fixes #17041

@JohnNiang JohnNiang force-pushed the refactor/add-siwtchusermixin-to-webjackson2module branch from 351a808 to cab6817 Compare May 7, 2025 02:59
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 7, 2025
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, @JohnNiang! Thanks for the quick turnaround.

In addition to my inline feedback will you please also:

  1. Add unit tests to demonstrate that the feature works
  2. Update the commit message to contains Closes gh-17041 on a separate line from the title like so:
Add SwitchUserGrantedAuthority to WebFlux Jackson Module

Closes gh-17041

@jzheaux jzheaux self-assigned this May 7, 2025
@jzheaux jzheaux added in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 7, 2025
@jzheaux jzheaux added this to the 7.0.x milestone May 7, 2025
@JohnNiang JohnNiang force-pushed the refactor/add-siwtchusermixin-to-webjackson2module branch 2 times, most recently from ad0485f to 8da8dee Compare May 8, 2025 03:44
Closes gh-17041

Signed-off-by: John Niang <johnniang@foxmail.com>
@jzheaux jzheaux force-pushed the refactor/add-siwtchusermixin-to-webjackson2module branch from 8da8dee to fe2f8a1 Compare May 12, 2025 23:13
@jzheaux jzheaux merged commit 9ba5c7b into spring-projects:main May 23, 2025
4 checks passed
@jzheaux
Copy link
Contributor

jzheaux commented May 23, 2025

Thanks, @JohnNiang, this is now merged into main!

@jzheaux jzheaux modified the milestones: 7.0.x, 7.0.0-M1 May 23, 2025
@JohnNiang JohnNiang deleted the refactor/add-siwtchusermixin-to-webjackson2module branch May 24, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web An issue in web modules (web, webmvc) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SwitchUserGrantedAuthority cannot be deserialized in Webflux
3 participants