Add resttemplate-to-restclient module: RestTemplate deprecation on Spring Framework 7.1 / Boot 4.2.0 vs 4.1.3, method mapping, exchange() trap, bridge URI encoding, RestTestClient, OpenRewrite recipe run, with real transcripts

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7M7FEdeEm3APj16Bu
This commit is contained in:
Claude
2026-11-21 21:26:48 +05:30
parent 5f85ec8d53
commit cbcfb05e35
77 changed files with 2187 additions and 0 deletions
@@ -0,0 +1,8 @@
# 09-timeouts (Spring Boot 4.1.3, JDK 25)
server: GET /slow?ms=1500 sleeps 1500 ms
application.properties equivalent: spring.http.clients.connect-timeout=300ms, spring.http.clients.read-timeout=300ms
injected RestClient.Builder (Boot properties) -> ResourceAccessException <- java.net.http.HttpTimeoutException, gave up after roughly 300-1200 ms
RestTemplateBuilder.build() (same Boot properties) -> ResourceAccessException <- java.net.http.HttpTimeoutException, gave up after roughly 300-1200 ms
RestClient.builder().requestFactory(detect().build(HttpClientSettings.defaults().withReadTimeout(300ms))) -> ResourceAccessException <- java.net.http.HttpTimeoutException, gave up after roughly 300-1200 ms
RestClient.create() (no timeouts configured) -> "done after 1500 ms", >1200 ms