Skip to content

@ModelAttribute name attribute is not supported in WebFlux #28423

Closed
@sbrannen

Description

@sbrannen

While reviewing #28422, I noticed that the name attribute in @ModelAttribute is not supported in WebFlux.

This is because MethodParameter is used instead of SynthesizingMethodParameter when retrieving the @ModelAttribute annotation. In other words, @AliasFor is not honored because the annotation is not synthesized. Consequently, only the value attribute is supported in WebFlux when specifying a custom name via @ModelAttribute.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions