prepend http:// to feign url if not there

This commit is contained in:
Spencer Gibb
2015-01-29 11:53:14 -07:00
parent 8410b8938a
commit 42422bef5c

View File

@@ -135,6 +135,9 @@ class FeignClientFactoryBean implements FactoryBean<Object>, InitializingBean {
if (StringUtils.hasText(this.name)) {
return loadBalance(feign(), this.type, this.name);
}
if (StringUtils.hasText(this.url) && !this.url.startsWith("http")) {
this.url = "http://" + this.url;
}
return feign().target(this.type, this.url);
}