Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gth99spB1CzQmBFofXmU4Z
16 lines
493 B
Java
16 lines
493 B
Java
package com.ankurm.boot42;
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.web.client.RestClient;
|
|
|
|
/** What the deprecated RestTemplateBuilder code turns into: an injected RestClient.Builder. */
|
|
@Configuration(proxyBeanMethods = false)
|
|
class RestClientReplacement {
|
|
|
|
@Bean
|
|
RestClient inventoryClient(RestClient.Builder builder) {
|
|
return builder.baseUrl("http://inventory.internal").build();
|
|
}
|
|
}
|