Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple quick fixes offered for @RequestMapping into GetMapping etc #1107

Closed
BoykoAlex opened this issue Sep 6, 2023 · 2 comments
Closed
Assignees
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: refactoring type: enhancement

Comments

@BoykoAlex
Copy link
Contributor

Currently OR only allows for converting @RequestMapping into precise mapping if only one Request Method is inferred from the @RequestMapping. However, if there are multiple request methods such @RequestMapping without the method parameter then it'd be useful to show a reconcile problem and offer quick fix for each method type.

Might be of some use flag all @RequestMapping annotations over methods and offer multiple quick fixes for @RequestMapping that has explicitly specified multiple request methods.

@BoykoAlex BoykoAlex added this to the 4.20.1.RELEASE milestone Sep 6, 2023
@BoykoAlex BoykoAlex self-assigned this Sep 6, 2023
@martinlippert martinlippert added for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: refactoring and removed status: waiting-for-triage labels Sep 11, 2023
@BoykoAlex
Copy link
Contributor Author

@martinlippert Precise annotations are GET, POST, PUT, DELETE, PATCH. This excludes OPTIONS and TRACE. Therefore if method type has OPTIONS or TRACE - no problem. Now, if there is a few request methods specified, i.e. POST and PUT. Shall I offer switching to either @PostMapping or @PutMapping?
Maybe all we want is just support @RequestMapping("/hello") kind of annotation where request method is unspecified?

@BoykoAlex
Copy link
Contributor Author

I have pushed 78cd6ac. Just show a number of quick fixes for @RequestMapping not specifying any request methods... likely this needs to be a specific request mapping not any request method. Therefore if two or more request methods specified the annotation won't be flagged and refactoring not offerred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: eclipse something that is specific for Eclipse for: vscode something that is specific for VSCode theme: refactoring type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants