[java] generateClientAsBean for restclient and webclient (#20754)

* [java] generateClientAsBean for restclient and webclient

Added possibility to generate restclient and webclient as a @Component in the same fashion as resttemplate.

Fix #17885
Fix #19229

* - Samples
This commit is contained in:
sabra
2025-03-05 10:50:24 +01:00
committed by GitHub
parent efc53f5d47
commit f2bbb9e0a2
72 changed files with 352 additions and 316 deletions

View File

@@ -11,17 +11,17 @@ import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class DefaultApi {