Skip to content

Support multiple @RequestMapping annotations (@GetMapping, etc) on a controller method #32043

Open
@sbrannen

Description

@sbrannen

As a follow-up to #31962, we would like to investigate the feasibility of supporting multiple @RequestMapping annotations on a single handler method.

One idea is to merge attributes from multiple @RequestMapping annotations into a single RequestMappingInfo instance if they only differ by RequestMethod.

Another idea is to create one RequestMappingInfo per @RequestMapping annotation on a handler method and figure out how to rework our infrastructure to support multiple RequestMappingInfo instances for a single handler method.

We should also keep in mind that we may potentially decide to support multiple composed @RequestMapping annotations (e.g., @PostMapping and @PutMapping) on a single method without making @RequestMapping itself a @Repeatable annotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: pending-design-workNeeds design work before any code can be developedtype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions