Skip to content

Detect @RequestMapping with path defined as constant instead of literal string #281

Closed
@aaguilera

Description

@aaguilera

It seems that Navigation (cmd+6) cannot detect @RequestMapping-annotated methods when the URL is defined as a constant instead of a literal string.
For example:

public class MyPaths {
    public static final String RESOURCE_PATH = "/somepath/resource";
}

@Controller
public class MyController {
    @RequestMapping(MyPaths.RESOURCE_PATH)
    public String method() {
        ... 
    }
}

In STS4, if I press Ctrl+6 (I'm using Eclipse-based STS4 on Linux) and start typing something like "@/some", the results list does not include the mapping for "/somepath/resource".

It would be nice if STS4 implemented such detection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions