Skip to content

@ImportHttpServices property for the HttpExchangeAdapter bean to use #35728

@ch4mpy

Description

@ch4mpy

Enhancement request

I have some RestClient and WebClient beans already defined in the factory bean (with advanced auto-configuration for HTTP proxy, request authorization, SSL bundles, base-URL, ...).

It would be helpful if @ImportHttpServices accepted a reference to the HttpExchangeAdapter bean to use when building the service proxy.

For instance:

@Configuration
@ImportHttpServices(group = "bidule", types = {BiduleApi.class}, adapter = "biduleClientAdapter")
@ImportHttpServices(group = "machin", types = {MachinApi.class}, adapter = "machinClientAdapter")
public class RestConfiguration {
  @Bean
  RestClientAdapter biduleClientAdapter(RestClient biduleClient) {
    return RestClientAdapter.create(biduleClient);
  }

  @Bean
  RestClientAdapter machinClientAdapter(RestClient machinClient) {
    return RestClientAdapter.create(machinClient);
  }
}

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by another

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions