150.3. Spring Boot Auto-Configuration

组件支持 19 选项,如下所示。

名称描述默认类型

camel.component.http4.allow-java-serialized-object

请求使用 context-type=application/x-java-serialized-object 时,是否允许 java serialization。默认情况下关闭。如果您启用此功能,Java 将把传入的数据从请求中反序列化为 Java,这可能会成为潜在的安全风险。

false

布尔值

camel.component.http4.client-connection-manager

使用自定义和共享 HttpClientConnectionManager 管理连接。如果已经进行了此配置,它将始终用于此组件创建的所有端点。选项为 org.apache.http.conn.HttpClientConnectionManager 类型。

 

字符串

camel.component.http4.connect-timeout

决定在建立连接前的超时(毫秒)。超时值为零被解释为无限超时。超时值为零被解释为无限超时。负值解析为未定义(系统默认值)。默认: code -1

-1

整数

camel.component.http4.connection-request-timeout

从连接管理器请求连接时使用的超时(毫秒)。超时值为零被解释为无限超时。超时值为零被解释为无限超时。负值解析为未定义(系统默认值)。默认: code -1

-1

整数

camel.component.http4.connection-time-to-live

连接到 live 的时间,单位为 millisecond,默认值始终为live。

 

Long

camel.component.http4.connections-per-route

每个路由的最大连接数。

20

整数

camel.component.http4.cookie-store

使用自定义 org.apache.http.client.CookieStore。默认情况下,使用 org.apache.http.impl.client.BasicCookieStore,它是仅 Cookie 存储的内存。请注意,如果 bridgeEndpoint=true,则 Cookie 存储被强制用作 noop cookie 存储,因为我们只作为代理存储。选项是一个 org.apache.http.client.CookieStore 类型。

 

字符串

camel.component.http4.enabled

启用 http4 组件

true

布尔值

camel.component.http4.header-filter-strategy

使用自定义 org.apache.camel.spi.HeaderFilterStrategy 过滤来自 Camel 消息的标头。选项是一个 org.apache.camel.spi.HeaderFilterStrategy 类型。

 

字符串

camel.component.http4.http-binding

使用自定义 HttpBinding 控制 Camel 消息和 HttpClient 之间的映射。选项是一个 org.apache.camel.http.common.HttpBinding 类型。

 

字符串

camel.component.http4.http-client-configurer

使用自定义 HttpClientConfigurer 执行将使用的 HttpClient 的配置。选项是一个 org.apache.camel.component.http4.HttpClientConfigurer 类型。

 

字符串

camel.component.http4.http-configuration

使用共享 HttpConfiguration 作为基本配置。选项是一个 org.apache.camel.http.common.HttpConfiguration 类型。

 

字符串

camel.component.http4.http-context

在执行请求时,使用自定义 org.apache.http.protocol.HttpContext。选项是一个 org.apache.http.protocol.HttpContext 类型。

 

字符串

camel.component.http4.max-total-connections

连接的最大数量。

200

整数

camel.component.http4.resolve-property-placeholders

启动时,组件是否应自行解析属性占位符。只有 String 类型的属性才能使用属性占位符。

true

布尔值

camel.component.http4.socket-timeout

以毫秒为单位定义套接字超时(SO_TIMEOUT),这是等待数据超时,或者有不同,在两个连续的数据数据包之间有不活动。超时值为零被解释为无限超时。负值解析为未定义(系统默认值)。默认: code -1

-1

整数

camel.component.http4.ssl-context-parameters

使用 SSLContextParameters 配置安全性。重要信息:每个 HttpComponent 支持一个 org.apache.camel.util.jsse.SSLContextParameters 实例。如果您需要使用 2 个或更多不同的实例,则需要为每个实例定义一个新的 HttpComponent。选项是一个 org.apache.camel.util.jsse.SSLContextParameters 类型。

 

字符串

camel.component.http4.use-global-ssl-context-parameters

启用使用全局 SSL 上下文参数。

false

布尔值

camel.component.http4.x509-hostname-verifier

使用自定义 X509HostnameVerifier,如 DefaultHostnameVerifier 或 org.apache.http.conn.ssl.NoopHostnameVerifier。选项是一个 javax.net.ssl.HostnameVerifier 类型。

 

字符串