Replace deprecated setters in RestTemplateBuilder

MSAL

Replaces setConnectTimeout, setReadTimeout, and setSslBundle method invocations with connectTimeout, readTimeout, and sslBundle respectively.

org.openrewrite.java.spring.boot3.ReplaceRestTemplateBuilderMethods
mod run . --recipe=org.openrewrite.java.spring.boot3.ReplaceRestTemplateBuilderMethods

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Change method name org.springframework.boot.web.client.RestTemplateBuilder setConnectTimeout(java.time.Duration) to connectTimeout
  2. Change method name org.springframework.boot.web.client.RestTemplateBuilder setReadTimeout(java.time.Duration) to readTimeout
  3. Change method name org.springframework.boot.web.client.RestTemplateBuilder setSslBundle(org.springframework.boot.ssl.SslBundle) to sslBundle
  4. Replace RestTemplateBuilder.requestFactory(Function) with requestFactoryBuilder