spring-projects / spring-projects/spring-framework
Support for @ModelAttribute dependency on webflux [SPR-16198]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
Dongmin Shin opened SPR-16198 and commented
@ModelAttribute method arguments of @ModelAttribute annotated method are not resolved on webflux
@ModelAttribute("a")
public A attrA(@PathVariable String param1) {
return new A(param1);
}
@ModelAttribute("b")
public B attrB(@ModelAttribute("a") A a, @RequestParam String param2) {
// a.getParam1() is null
return new B(a.getParam1(), param2);
}
cf.)
Affects: 5.0.1
References: pull request https://github.com/spring-projects/spring-framework/pull/2003
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the cited webflux ModelInitializer.java entry point with spring-web's ModelFactory.java behavior. Reproduce the @ModelAttribute example and trace how method arguments are resolved; done means the dependent @ModelAttribute receives the previously populated model attribute, with coverage for the demonstrated case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100