Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2017-02-16 00:48:15 +00:00
parent 545bb939dc
commit f711b7697c
+14
View File
@@ -1965,6 +1965,20 @@ There is a limitation with the implementation of fallbacks in Feign and how Hyst
</div>
</div>
<div class="sect2">
<h3 id="_feign_and_code_primary_code">Feign and <code>@Primary</code></h3>
<div class="paragraph">
<p>When using Feign with Hystrix fallbacks, there are multiple beans in the <code>ApplicationContext</code> of the same type. This will cause <code>@Autowired</code> to work because there isn&#8217;t exactly one bean, or one marked as primary. To work around this, Spring Cloud Netflix marks all Feign instances as <code>@Primary</code>, so Spring Framework will know which bean to inject. In some cases, this may not be desirable. To turn off this behavior set the <code>primary</code> attribute of <code>@FeignClient</code> to false.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-java" data-lang="java">@FeignClient(name = "hello", primary = false)
public interface HelloClient {
// methods here
}</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="spring-cloud-feign-inheritance">Feign Inheritance Support</h3>
<div class="paragraph">
<p>Feign supports boilerplate apis via single-inheritance interfaces.