Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@SessionAttributes handler invoked too early if controller method execution is deferred #30337

Closed
daihuabin opened this issue Apr 14, 2023 · 2 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@daihuabin
Copy link

daihuabin commented Apr 14, 2023

saveModel will be executed before the controller method when the return value is Mono<View>

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 14, 2023
@rstoyanchev
Copy link
Contributor

rstoyanchev commented Apr 18, 2023

Indeed, this should be executed later, probably as part of result handling in ViewResolutionResultHandler where we also use BindingContext to update the model with BindingResult, at a point after the return value is resolved.

@rstoyanchev rstoyanchev self-assigned this Apr 18, 2023
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 18, 2023
@rstoyanchev rstoyanchev added this to the 6.1.0-M1 milestone Apr 18, 2023
@rstoyanchev rstoyanchev changed the title saveModel will be executed before the controller method when the return value is Mono<View> @SessionAttributes handler invoked too early if controller method execution is deferred Apr 18, 2023
@rstoyanchev rstoyanchev modified the milestones: 6.1.0-M1, 6.1.0-M2 Jun 13, 2023
@rstoyanchev
Copy link
Contributor

Fixed in 74972fb but referenced the wrong issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants