Skip to content

Commit

Permalink
removed duplicate feign ApacheHttpClient configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Aug 31, 2016
1 parent 9b550f7 commit 959b007
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public Targeter feignTargeter() {

// the following configuration is for alternate feign clients if
// ribbon is not on the class path.
// see corresponding confiurations in FeignRibbonClientAutoConfiguration
// see corresponding configurations in FeignRibbonClientAutoConfiguration
// for load balanced ribbon clients.
@Configuration
@ConditionalOnClass(ApacheHttpClient.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,4 @@ public Feign.Builder feignBuilder() {
return Feign.builder();
}

@Configuration
@ConditionalOnClass(ApacheHttpClient.class)
protected static class HttpClientConfiguration {

@Autowired(required = false)
private HttpClient httpClient;

@ConditionalOnMissingBean
@Bean
public Client feignClient() {
if (this.httpClient != null) {
return new ApacheHttpClient(this.httpClient);
}
return new ApacheHttpClient();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void apply(RequestTemplate template) {
}
}

@FeignClient(value = "foo", configuration = FooConfiguration.class)
@FeignClient(name = "foo", url = "http://foo", configuration = FooConfiguration.class)
interface FooClient {
@RequestLine("GET /")
String get();
Expand Down Expand Up @@ -191,7 +191,7 @@ public Feign.Builder feignBuilder() {
}
}

@FeignClient(value = "bar", configuration = BarConfiguration.class)
@FeignClient(name = "bar", url = "http://bar", configuration = BarConfiguration.class)
interface BarClient {
@RequestMapping(value = "/", method = RequestMethod.GET)
String get();
Expand Down

0 comments on commit 959b007

Please sign in to comment.