Skip to content

Commit

Permalink
Renaming config classes. Adding comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaMaciaszek committed Sep 19, 2024
1 parent 6f72aaf commit 3902eca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class HttpInterfaceClientsAutoConfiguration {
@ConditionalOnProperty(value = "spring.interfaceclients.http.resttemplate.enabled", havingValue = "false",
matchIfMissing = true)
@Import(RestClientInterfaceClientsImportRegistrar.class)
protected static class RestClientAdapterProviderConfiguration {
protected static class RestClientInterfaceClientsConfiguration {

}

Expand All @@ -67,15 +67,15 @@ protected static class RestClientAdapterProviderConfiguration {
@Conditional(NotReactiveWebApplicationCondition.class)
@ConditionalOnProperty(value = "spring.interfaceclients.http.resttemplate.enabled", havingValue = "true")
@Import(RestTemplateInterfaceClientsImportRegistrar.class)
protected static class RestTemplateAdapterProviderConfiguration {
protected static class RestTemplateInterfaceClientsConfiguration {

}

@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ WebClient.class, WebClientAdapter.class, HttpServiceProxyFactory.class })
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.REACTIVE)
@Import(WebClientInterfaceClientsImportRegistrar.class)
protected static class WebClientAdapterProviderConfiguration {
protected static class WebClientInterfaceClientsConfiguration {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected HttpExchangeAdapter exchangeAdapter() {
.qualifiedBean(this.applicationContext.getBeanFactory(), RestClient.class, this.clientId);
if (userProvidedRestClient != null) {
// If the user wants to set the baseUrl directly on the builder,
// it should not be set in properties.
// it should not be set in the properties.
if (baseUrl != null) {
userProvidedRestClient = userProvidedRestClient.mutate().baseUrl(baseUrl).build();
}
Expand All @@ -60,7 +60,8 @@ protected HttpExchangeAdapter exchangeAdapter() {
RestClient.Builder userProvidedRestClientBuilder = QualifiedBeanProvider
.qualifiedBean(this.applicationContext.getBeanFactory(), RestClient.Builder.class, this.clientId);
if (userProvidedRestClientBuilder != null) {

// If the user wants to set the baseUrl directly on the builder,
// it should not be set in the properties.
if (baseUrl != null) {
userProvidedRestClientBuilder.baseUrl(baseUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springframework.web.reactive.function.client.support.WebClientAdapter;
import org.springframework.web.service.invoker.HttpExchangeAdapter;

//FIXME
/**
* {@link RestClient}-backed {@link AbstractHttpInterfaceClientsFactoryBean}
* implementation.
Expand Down

0 comments on commit 3902eca

Please sign in to comment.