Skip to content

Web Config Path incorrectly annotated in Eclipse #1891

Closed

Description

@shadowcgray

Describe the bug
When a PathPrefix is selectively configured, the tools web config annotation is annotated for all controller classes in Eclipse editors.

Tested with Spring Tool Suite 5.1.1.RELEASE.

To Reproduce

  1. Configure a selective PathPrefix (using Predicates) in a WebMvcConfigurer @configuration class
  2. Construct a non-matching controller and open it in a code editor.

Sample
https://gist.github.com/shadowcgray/6d7c7a48b51a10620cb4f236a424541b

Image

Activity

  1. added
    for: eclipse
    for: vscode
    and removed on May 16, 2026
  2. added this to the Backlog milestone on May 16, 2026
  3. martinlippert commented on May 16, 2026

    @martinlippert
    Member

    Good find, the current implementation indeed does not take those predicates into account. I am not sure how far we could / should go here with regards to static code analysis to identify all those cases, so give us a little while to think about this case.

  4. added a commit that references this issue on May 18, 2026
  5. martinlippert commented on May 18, 2026

    @martinlippert
    Member

    Fixed, will ship as part of the 5.2.0 release. Thanks again for filing the issue and providing the sample code, very much appreciated.

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: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions