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:
@@ -0,0 +1,14 @@
|
||||
# 07-default-request-factories (Spring Boot 4.1.3, JDK 25)
|
||||
request factory class on RestTemplate: new RestTemplate() -> org.springframework.http.client.SimpleClientHttpRequestFactory
|
||||
request factory class on RestTemplate: RestTemplateBuilder.build() -> org.springframework.http.client.JdkClientHttpRequestFactory
|
||||
|
||||
User-Agent the server received (GET /whoami)
|
||||
new RestTemplate() : Java/25.0.5.1
|
||||
RestClient.create() : Java-http-client/25.0.5.1
|
||||
injected RestClient.Builder (Boot) : Java-http-client/25.0.5.1
|
||||
RestTemplateBuilder.build() (Boot) : Java-http-client/25.0.5.1
|
||||
|
||||
PATCH /students/1
|
||||
new RestTemplate().patchForObject(...) -> ResourceAccessException: I/O error on PATCH request for "http://localhost:<port>/students/1": Invalid HTTP method: PATCH
|
||||
RestClient.create().patch()...body(Student) -> Student[id=1, name=Asha P]
|
||||
new RestTemplate(new JdkClientHttpRequestFactory()).patchForObject(...) -> Student[id=1, name=Asha Q]
|
||||
Reference in New Issue
Block a user