Sync docs from 2.2.x to gh-pages

This commit is contained in:
buildmaster
2020-05-11 11:28:06 +00:00
parent 94882f725e
commit 420bb8a2b1
2 changed files with 58 additions and 2 deletions

View File

@@ -337,7 +337,7 @@ If none of them is in the classpath, the default feign client is used.</p>
You can customize the HTTP client used by providing a bean of either <code>org.apache.http.impl.client.CloseableHttpClient</code> when using Apache or <code>okhttp3.OkHttpClient</code> when using OK HTTP.</p>
</div>
<div class="paragraph">
<p>Spring Cloud Netflix <em>does not</em> provide the following beans by default for feign, but still looks up beans of these types from the application context to create the feign client:</p>
<p>Spring Cloud OpenFeign <em>does not</em> provide the following beans by default for feign, but still looks up beans of these types from the application context to create the feign client:</p>
</div>
<div class="ulist">
<ul>
@@ -491,6 +491,30 @@ public interface BarClient {
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>It is also possible to configure FeignClient not to inherit beans from the parent context.
You can do this by overriding the <code>inheritParentConfiguration()</code> in a <code>FeignClientConfigurer</code>
bean to return <code>false</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Configuration
public class CustomConfiguration{
@Bean
public FeignClientConfigurer feignClientConfigurer() {
return new FeignClientConfigurer() {
@Override
public boolean inheritParentConfiguration() {
return false;
}
};
}
}</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="creating-feign-clients-manually"><a class="anchor" href="#creating-feign-clients-manually"></a><a class="link" href="#creating-feign-clients-manually">1.3. Creating Feign Clients Manually</a></h3>
@@ -568,6 +592,10 @@ the default Feign native annotations.
</tr>
</table>
</div>
<div class="paragraph">
<p>You can also use the <code>Builder`to configure FeignClient not to inherit beans from the parent context.
You can do this by overriding calling `inheritParentContext(false)</code> on the <code>Builder</code>.</p>
</div>
</div>
<div class="sect2">
<h3 id="spring-cloud-feign-hystrix"><a class="anchor" href="#spring-cloud-feign-hystrix"></a><a class="link" href="#spring-cloud-feign-hystrix">1.4. Feign Hystrix Support</a></h3>

View File

@@ -337,7 +337,7 @@ If none of them is in the classpath, the default feign client is used.</p>
You can customize the HTTP client used by providing a bean of either <code>org.apache.http.impl.client.CloseableHttpClient</code> when using Apache or <code>okhttp3.OkHttpClient</code> when using OK HTTP.</p>
</div>
<div class="paragraph">
<p>Spring Cloud Netflix <em>does not</em> provide the following beans by default for feign, but still looks up beans of these types from the application context to create the feign client:</p>
<p>Spring Cloud OpenFeign <em>does not</em> provide the following beans by default for feign, but still looks up beans of these types from the application context to create the feign client:</p>
</div>
<div class="ulist">
<ul>
@@ -491,6 +491,30 @@ public interface BarClient {
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>It is also possible to configure FeignClient not to inherit beans from the parent context.
You can do this by overriding the <code>inheritParentConfiguration()</code> in a <code>FeignClientConfigurer</code>
bean to return <code>false</code>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Configuration
public class CustomConfiguration{
@Bean
public FeignClientConfigurer feignClientConfigurer() {
return new FeignClientConfigurer() {
@Override
public boolean inheritParentConfiguration() {
return false;
}
};
}
}</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="creating-feign-clients-manually"><a class="anchor" href="#creating-feign-clients-manually"></a><a class="link" href="#creating-feign-clients-manually">1.3. Creating Feign Clients Manually</a></h3>
@@ -568,6 +592,10 @@ the default Feign native annotations.
</tr>
</table>
</div>
<div class="paragraph">
<p>You can also use the <code>Builder`to configure FeignClient not to inherit beans from the parent context.
You can do this by overriding calling `inheritParentContext(false)</code> on the <code>Builder</code>.</p>
</div>
</div>
<div class="sect2">
<h3 id="spring-cloud-feign-hystrix"><a class="anchor" href="#spring-cloud-feign-hystrix"></a><a class="link" href="#spring-cloud-feign-hystrix">1.4. Feign Hystrix Support</a></h3>