You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple quick fixes offered for @RequestMapping into GetMapping etc #1107
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.
@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?
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.
Activity
BoykoAlex commentedon Sep 14, 2023
@martinlippert Precise annotations are
GET, POST, PUT, DELETE, PATCH. This excludesOPTIONSandTRACE. Therefore if method type hasOPTIONSorTRACE- no problem. Now, if there is a few request methods specified, i.e.POSTandPUT. Shall I offer switching to either@PostMappingor@PutMapping?Maybe all we want is just support
@RequestMapping("/hello")kind of annotation where request method is unspecified?BoykoAlex commentedon Sep 15, 2023
I have pushed 78cd6ac. Just show a number of quick fixes for
@RequestMappingnot 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.