Package org.openrewrite.java.spring
Class NoRequestMappingAnnotation
- java.lang.Object
-
- org.openrewrite.Recipe
-
- org.openrewrite.java.spring.NoRequestMappingAnnotation
-
public class NoRequestMappingAnnotation extends org.openrewrite.RecipeReplace method declaration @RequestMapping annotations with the associated variant as defined by the request method type (GET, POST, PUT, PATCH, DELETE)(HEAD, OPTIONS, TRACE) methods do not have associated RequestMapping variant and are not converted
- @RequestMapping() changes to @GetMapping
- @RequestMapping(method = POST) changes to @PostMapping
- @RequestMapping(method = { HEAD, GET }) No change
-
-
Constructor Summary
Constructors Constructor Description NoRequestMappingAnnotation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()java.lang.StringgetDisplayName()protected @Nullable org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>getSingleSourceApplicableTest()protected org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext>getVisitor()
-
-
-
Method Detail
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
public java.lang.String getDescription()
- Overrides:
getDescriptionin classorg.openrewrite.Recipe
-
getSingleSourceApplicableTest
@Nullable protected @Nullable org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getSingleSourceApplicableTest()
- Overrides:
getSingleSourceApplicableTestin classorg.openrewrite.Recipe
-
getVisitor
protected org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()
- Overrides:
getVisitorin classorg.openrewrite.Recipe
-
-