Configuration Properties
Configuration properties for the httpexchange-spring-boot-starter project.
This page was generated by spring-configuration-property-documenter.
Table of Contents
httpexchange-spring-boot-autoconfigure
http-exchange
Class: io.github.danielliu1123.httpexchange.HttpExchangeProperties
Key | Type | Description | Default value | Deprecation |
---|---|---|---|---|
base-packages | java.util.Set<java.lang.String> | Base packages to scan, use {@link EnableExchangeClients#basePackages} first if configured. | ||
base-url | java.lang.String | Default base url, 'http' scheme can be omitted. <p> If loadbalancer is enabled, this value means the service id. <ul> <li> localhost:8080 </li> <li> http://localhost:8080 </li> <li> https://localhost:8080 </li> <li> localhost:8080/api </li> <li> user(service id) </li> </ul> | ||
bean-to-query-enabled | java.lang.Boolean | Whether to convert Java bean to query parameters, default value is {@code false}. | false | |
channels | java.util.List<io.github.danielliu1123.httpexchange.HttpExchangeProperties$Channel> | Channels configuration. | ||
client-type | io.github.danielliu1123.httpexchange.HttpExchangeProperties$ClientType | Client Type, if not specified, an appropriate client type will be set. <ul> <li> Use {@link ClientType#REST_CLIENT} if none of the methods in the client return Reactive type. <li> Use {@link ClientType#WEB_CLIENT} if any method in the client returns Reactive type. </ul> <p> In most cases, you don't need to explicitly specify the client type. <p color="orange"> NOTE: the {@link #connectTimeout} and {@link #readTimeout} settings are not supported by {@link ClientType#WEB_CLIENT}. @see ClientType @since 3.2.0 | ||
clients | java.util.Set<java.lang.Class<?>> | Exchange client interfaces to register as beans, use {@link EnableExchangeClients#clients} first if configured. @since 3.2.0 | ||
connect-timeout | java.lang.Integer | Connect timeout duration, specified in milliseconds. @see HttpClientProperties#connectTimeout @since 3.2.0 @deprecated From Spring Boot 3.4.0, prefer {@code spring.http.client.connect-timeout}, this configuration will override {@code spring.http.client.connect-timeout}, this configuration will be removed in the 3.5.0. | Reason: Use 'spring.http.client.connect-timeout' instead, use for replacement: spring.http.client.connect-timeout | |
enabled | java.lang.Boolean | Whether to enable http exchange autoconfiguration, default {@code true}. | true | |
headers | java.util.List<io.github.danielliu1123.httpexchange.HttpExchangeProperties$Header> | Default headers will be added to all the requests. | ||
http-client-reuse-enabled | java.lang.Boolean | Whether to enable http client reuse, default {@code true}. <p> Same {@link Channel} configuration will share the same http client if enabled. @since 3.2.2 | true | |
loadbalancer-enabled | java.lang.Boolean | Whether to enable loadbalancer, default {@code true}. <p> Prerequisites: <ul> <li> {@code spring-cloud-starter-loadbalancer} dependency in the classpath.</li> <li> {@code spring.cloud.loadbalancer.enabled=true}</li> </ul> @since 3.2.0 | true | |
read-timeout | java.lang.Integer | Read timeout duration, specified in milliseconds. @see HttpClientProperties#readTimeout @since 3.2.0 @deprecated From Spring Boot 3.4.0, prefer {@code spring.http.client.read-timeout}, this configuration will override {@code spring.http.client.read-timeout}, this configuration will be removed in the 3.5.0. | Reason: Use 'spring.http.client.read-timeout' instead, use for replacement: spring.http.client.read-timeout | |
request-mapping-support-enabled | java.lang.Boolean | whether to process {@link RequestMapping} based annotation, default {@code false}. <p color="red"> Recommending to use {@link HttpExchange} instead of {@link RequestMapping}. @since 3.2.0 | false | |
warn-unused-config-enabled | java.lang.Boolean | Whether to check unused configuration, default {@code true}. @since 3.2.0 | true |
http-exchange.refresh
Class: io.github.danielliu1123.httpexchange.HttpExchangeProperties$Refresh
Key | Type | Description | Default value | Deprecation |
---|---|---|---|---|
enabled | java.lang.Boolean | Whether to enable refresh exchange clients, default {@code false}. <p> This feature needs {@code spring-cloud-context} dependency in the classpath. <p color="orange"> NOTE: This feature is not supported by native image. @see <a href="https://github.com/spring-cloud/spring-cloud-release/wiki/AOT-transformations-and-native-image-support#refresh-scope">Refresh Scope</a> | false |