Skip to main content

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

KeyTypeDescriptionDefault valueDeprecation
base-packagesjava.util.Set<java.lang.String>Base packages to scan, use {@link EnableExchangeClients#basePackages} first if configured.
base-urljava.lang.StringDefault 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-enabledjava.lang.BooleanWhether to convert Java bean to query parameters, default value is {@code false}.false
channelsjava.util.List<io.github.danielliu1123.httpexchange.HttpExchangeProperties$Channel>Channels configuration.
client-typeio.github.danielliu1123.httpexchange.HttpExchangeProperties$ClientTypeClient 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
clientsjava.util.Set<java.lang.Class<?>>Exchange client interfaces to register as beans, use {@link EnableExchangeClients#clients} first if configured. @since 3.2.0
connect-timeoutjava.lang.IntegerConnect 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
enabledjava.lang.BooleanWhether to enable http exchange autoconfiguration, default {@code true}.true
headersjava.util.List<io.github.danielliu1123.httpexchange.HttpExchangeProperties$Header>Default headers will be added to all the requests.
http-client-reuse-enabledjava.lang.BooleanWhether to enable http client reuse, default {@code true}. <p> Same {@link Channel} configuration will share the same http client if enabled. @since 3.2.2true
loadbalancer-enabledjava.lang.BooleanWhether 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.0true
read-timeoutjava.lang.IntegerRead 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-enabledjava.lang.Booleanwhether to process {@link RequestMapping} based annotation, default {@code false}. <p color="red"> Recommending to use {@link HttpExchange} instead of {@link RequestMapping}. @since 3.2.0false
warn-unused-config-enabledjava.lang.BooleanWhether to check unused configuration, default {@code true}. @since 3.2.0true

http-exchange.refresh

Class: io.github.danielliu1123.httpexchange.HttpExchangeProperties$Refresh

KeyTypeDescriptionDefault valueDeprecation
enabledjava.lang.BooleanWhether 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&quot;&gt;Refresh Scope</a>false