Appendix A: 常见的应用属性
本站(springdoc.cn)中的内容来源于 spring.io ,原始版权归属于 spring.io。由 springdoc.cn 进行翻译,整理。可供个人学习、研究,未经许可,不得进行任何转载、商用或与之相关的行为。 商标声明:Spring 是 Pivotal Software, Inc. 在美国以及其他国家的商标。 |
各种属性可以在 application.properties
文件、application.yml
文件中指定,也可以作为命令行开关。本附录提供了一个常见的 Spring Cloud OpenFeign 属性列表,以及对消费这些属性的底层类的引用。
属性贡献可以来自你classpath上的其他jar文件,所以你不应该认为这是一个详尽的列表。另外,你可以定义你自己的属性。 |
Name | Default | Description |
---|---|---|
spring.cloud.openfeign.autoconfiguration.jackson.enabled |
|
If true, PageJacksonModule and SortJacksonModule bean will be provided for Jackson page decoding. |
spring.cloud.openfeign.circuitbreaker.enabled |
|
If true, an OpenFeign client will be wrapped with a Spring Cloud CircuitBreaker circuit breaker. |
spring.cloud.openfeign.circuitbreaker.group.enabled |
|
If true, an OpenFeign client will be wrapped with a Spring Cloud CircuitBreaker circuit breaker with with group. |
spring.cloud.openfeign.client.config |
||
spring.cloud.openfeign.client.decode-slash |
|
Feign clients do not encode slash |
spring.cloud.openfeign.client.default-config |
|
|
spring.cloud.openfeign.client.default-to-properties |
|
|
spring.cloud.openfeign.client.refresh-enabled |
|
Enables options value refresh capability for Feign. |
spring.cloud.openfeign.compression.request.enabled |
|
Enables the request sent by Feign to be compressed. |
spring.cloud.openfeign.compression.request.mime-types |
|
The list of supported mime types. |
spring.cloud.openfeign.compression.request.min-request-size |
|
The minimum threshold content size. |
spring.cloud.openfeign.compression.response.enabled |
|
Enables the response from Feign to be compressed. |
spring.cloud.openfeign.encoder.charset-from-content-type |
|
Indicates whether the charset should be derived from the {@code Content-Type} header. |
spring.cloud.openfeign.httpclient.connection-timeout |
|
|
spring.cloud.openfeign.httpclient.connection-timer-repeat |
|
|
spring.cloud.openfeign.httpclient.disable-ssl-validation |
|
|
spring.cloud.openfeign.httpclient.enabled |
|
Enables the use of the Apache HTTP Client by Feign. |
spring.cloud.openfeign.httpclient.follow-redirects |
|
|
spring.cloud.openfeign.httpclient.hc5.enabled |
|
Enables the use of the Apache HTTP Client 5 by Feign. |
spring.cloud.openfeign.httpclient.hc5.pool-concurrency-policy |
Pool concurrency policies. |
|
spring.cloud.openfeign.httpclient.hc5.pool-reuse-policy |
Pool connection re-use policies. |
|
spring.cloud.openfeign.httpclient.hc5.socket-timeout |
|
Default value for socket timeout. |
spring.cloud.openfeign.httpclient.hc5.socket-timeout-unit |
Default value for socket timeout unit. |
|
spring.cloud.openfeign.httpclient.max-connections |
|
|
spring.cloud.openfeign.httpclient.max-connections-per-route |
|
|
spring.cloud.openfeign.httpclient.ok-http.read-timeout |
|
{@link OkHttpClient} read timeout; defaults to 60 seconds. |
spring.cloud.openfeign.httpclient.time-to-live |
|
|
spring.cloud.openfeign.httpclient.time-to-live-unit |
||
spring.cloud.openfeign.micrometer.enabled |
|
Enables Micrometer capabilities for Feign. |
spring.cloud.openfeign.oauth2.enabled |
|
Enables feign interceptor for managing oauth2 access token. |
spring.cloud.openfeign.oauth2.load-balanced |
|
Enables load balancing for oauth2 access token provider. |
spring.cloud.openfeign.okhttp.enabled |
|
Enables the use of the OK HTTP Client by Feign. |