-
Notifications
You must be signed in to change notification settings - Fork 86
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
Recipe to migrate @RequestMapping
over a FeignClient
interface to @FeignClient
path attribute
#661
Conversation
… ``@FeignClient` path attribute
src/main/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClient.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClient.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClientTest.java
Outdated
Show resolved
Hide resolved
Thanks a lot for the help here @wapkch ! Great to see these attributes moved when upgrading. :) |
Hi @wapkch thanks for providing! If you want to get rid of the github-actions comments, you can utilize OpenRewrite with the OpenRewrite best practices recipe. |
Do you know you can use OpenRewrite reicpes inside imperative recipes? cd = new AddOrUpdateAnnotationAttribute(FEIGN_CLIENT, "path", pathValueFromRequestMapping, true, false)
.getVisitor().visitClassDeclaration(cd, ctx);
cd = new RemoveAnnotation(REQUEST_MAPPING)
.getVisitor().visitClassDeclaration(cd, ctx); |
src/main/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClient.java
Outdated
Show resolved
Hide resolved
… ``@FeignClient` path attribute
src/main/java/org/openrewrite/java/spring/cloud2022/MigrateRequestMappingOnFeignClient.java
Outdated
Show resolved
Hide resolved
Thanks @wapkch, for the fixes and congrats to your first merged contribution 🎆 |
What's changed?
@RequestMapping
over aFeignClient
interface to@FeignClient
path attribute #655Checklist