Skip to content

extract parent path in controllers #1924

Closed

Description

@martinlippert

In case a controller does not have a common parent path defined on the class level using a @RequestMapping annotation, but all the embodied request mappings inside the class share the same prefix, we should offer a validation and a code action for this to extract the common parent path into a @RequestMapping annotation at the class level.

Activity

  1. added this to the 5.4.0.RELEASE milestone on Jul 1, 2026
  2. added
    for: eclipse
    for: vscode
    on Jul 1, 2026
  3. martinlippert commented on Jul 1, 2026

    @martinlippert
    MemberAuthor

    On top of this, it might be useful to implement this as an auto completion as well, so that when users type @RequestMapping at the class level, the commonly used parent path is suggested and if applied, automatically removed from the other request mapping annotations.

  4. added a commit that references this issue on Aug 12, 2026
  5. martinlippert commented on Aug 12, 2026

    @martinlippert
    MemberAuthor

    Closing this as fixed, validation and quick fix got added. Auto completion - as mentioned in the previous comment - could be done in a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

for: eclipsefor: vscodetype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions