Find source files where RestTemplate can migrate to RestClient
ProprietaryMarks source files of a repository whose RestTemplate usages can all be retyped to RestClient. A repository is left alone when it extends RestTemplate or RestTemplateBuilder, constructs a RestTemplate in a way that has no RestClient equivalent, uses a RestTemplateBuilder constructor or method without a direct RestClient.Builder equivalent, refers to RestOperations, or hands a RestTemplate, RestTemplateBuilder or RestTemplateCustomizer to or receives one from code it does not declare itself, as RestClient neither extends nor implements those types and the retyped code would no longer compile. It is also left alone when it calls exchange with a RequestEntity other than a variable whose body type is Void. So is a repository that sends an HttpEntity whose body is only known at runtime, as RestClient fails on a null body.
io. moderne. java. spring. boot3. IsMigratableToRestClientmod run . --recipe= io. moderne. java. spring. boot3. IsMigratableToRestClientInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.