From f711b7697c0759d4677ebe5a3540b0e5a9be52a7 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 16 Feb 2017 00:48:15 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- spring-cloud-netflix.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spring-cloud-netflix.html b/spring-cloud-netflix.html index d7a0df74f..5544f2b50 100644 --- a/spring-cloud-netflix.html +++ b/spring-cloud-netflix.html @@ -1965,6 +1965,20 @@ There is a limitation with the implementation of fallbacks in Feign and how Hyst
+

Feign and @Primary

+
+

When using Feign with Hystrix fallbacks, there are multiple beans in the ApplicationContext of the same type. This will cause @Autowired to work because there isn’t exactly one bean, or one marked as primary. To work around this, Spring Cloud Netflix marks all Feign instances as @Primary, so Spring Framework will know which bean to inject. In some cases, this may not be desirable. To turn off this behavior set the primary attribute of @FeignClient to false.

+
+
+
+
@FeignClient(name = "hello", primary = false)
+public interface HelloClient {
+	// methods here
+}
+
+
+
+

Feign Inheritance Support

Feign supports boilerplate apis via single-inheritance interfaces.