Skip to content

Commit 093feda

Browse files
committed
add warning when not configure base url
1 parent ad5b1c9 commit 093feda

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/freemanan/starter/httpexchange/ExchangeClientCreator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import com.freemanan.starter.httpexchange.shaded.ShadedHttpServiceProxyFactory;
66
import java.time.Duration;
77
import java.util.Optional;
8+
import org.slf4j.Logger;
9+
import org.slf4j.LoggerFactory;
810
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
911
import org.springframework.core.env.Environment;
1012
import org.springframework.util.Assert;
@@ -22,6 +24,7 @@
2224
* @author Freeman
2325
*/
2426
class ExchangeClientCreator {
27+
private static final Logger log = LoggerFactory.getLogger(ExchangeClientCreator.class);
2528

2629
private final ConfigurableBeanFactory beanFactory;
2730
private final Environment environment;
@@ -108,6 +111,8 @@ private WebClient buildWebClient() {
108111
baseUrl = "http://" + baseUrl;
109112
}
110113
builder.baseUrl(baseUrl);
114+
} else {
115+
log.warn("No base-url configuration found for client: {}", clientType.getName());
111116
}
112117
if (!CollectionUtils.isEmpty(channelConfig.getHeaders())) {
113118
channelConfig

0 commit comments

Comments
 (0)