Skip to content

@RequestMapping narrowing based on presence of command object [SPR-4368] #9046

@spring-projects-issues

Description

@spring-projects-issues

Andreas Schildbach opened SPR-4368 and commented

@RequestMapping largely takes the responsibilities of the former AbstractFormController.isFormSubmission().

Unfortunately, I stumbled upon some cases that are not handled yet by @RequestMapping (well).

  1. Mapping only matches if command object is present / not present

I use this frequently if a have a form with http-method GET (e.g. read-only search forms). In this case, I cannot distinguish by method, and I do not want to distinguish by parameter (the naming of the parameters is up to Spring Binding / Tag Library).

  1. Mapping only matches if parameter is not present

Although not needed as urgently as 1), it would make @RequestMappings easier to formulate and a bit more robust. For example, I see some cases where you want a parameter to be present, and on the other related mapping you want the parameter to not be present.


Affects: 2.5.1

Issue Links:

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions