Fix HC5 docs. Fixes gh-887.
This commit is contained in:
@@ -140,7 +140,9 @@ If none of them is on the classpath, the default feign client is used.
|
|||||||
|
|
||||||
NOTE: `spring-cloud-starter-openfeign` supports `spring-cloud-starter-loadbalancer`. However, as is an optional dependency, you need to make sure it has been added to your project if you want to use it.
|
NOTE: `spring-cloud-starter-openfeign` supports `spring-cloud-starter-loadbalancer`. However, as is an optional dependency, you need to make sure it has been added to your project if you want to use it.
|
||||||
|
|
||||||
The OkHttpClient and Apache HttpClient 5 Feign clients can be used by setting `spring.cloud.openfeign.okhttp.enabled` or `spring.cloud.openfeign.httpclient.hc5.enabled` to `true`, respectively, and having them on the classpath.
|
To use OkHttpClient-backed Feign clients, make sure OKHttpClient is on your classpath and set `spring.cloud.openfeign.okhttp.enabled` to `true`.
|
||||||
|
|
||||||
|
When it comes to the Apache HttpClient 5-backed Feign clients, it's enough to ensure HttpClient 5 is on the classpath, but you can still disable its use for Feign Clients by setting `spring.cloud.openfeign.httpclient.hc5.enabled` to `false`.
|
||||||
You can customize the HTTP client used by providing a bean of either `org.apache.hc.client5.http.impl.classic.CloseableHttpClient` when using Apache HC5.
|
You can customize the HTTP client used by providing a bean of either `org.apache.hc.client5.http.impl.classic.CloseableHttpClient` when using Apache HC5.
|
||||||
|
|
||||||
You can further customise http clients by setting values in the `spring.cloud.openfeign.httpclient.xxx` properties. The ones prefixed just with `httpclient` will work for all the clients, the ones prefixed with `httpclient.hc5` to Apache HttpClient 5 and the ones prefixed with `httpclient.okhttp` to OkHttpClient. You can find a full list of properties you can customise in the appendix.
|
You can further customise http clients by setting values in the `spring.cloud.openfeign.httpclient.xxx` properties. The ones prefixed just with `httpclient` will work for all the clients, the ones prefixed with `httpclient.hc5` to Apache HttpClient 5 and the ones prefixed with `httpclient.okhttp` to OkHttpClient. You can find a full list of properties you can customise in the appendix.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
"name": "spring.cloud.openfeign.httpclient.hc5.enabled",
|
"name": "spring.cloud.openfeign.httpclient.hc5.enabled",
|
||||||
"type": "java.lang.Boolean",
|
"type": "java.lang.Boolean",
|
||||||
"description": "Enables the use of the Apache HTTP Client 5 by Feign.",
|
"description": "Enables the use of the Apache HTTP Client 5 by Feign.",
|
||||||
"defaultValue": "false"
|
"defaultValue": "true"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spring.cloud.openfeign.okhttp.enabled",
|
"name": "spring.cloud.openfeign.okhttp.enabled",
|
||||||
|
|||||||
Reference in New Issue
Block a user