54.21. Spring Boot Auto-Configuration


当在 Spring Boot 中使用 Salesforce 时,请确保使用以下 Maven 依赖项来支持自动配置:

<dependency>
  <groupId>org.apache.camel.springboot</groupId>
  <artifactId>camel-salesforce-starter</artifactId>
</dependency>
Copy to Clipboard Toggle word wrap

组件支持 91 个选项,如下所列。

Expand
Name描述默认值类型

camel.component.salesforce.all-or-none

复合 API 选项,以指示在是否有成功时回滚所有记录。

false

布尔值

camel.component.salesforce.apex-method

APEX 方法名称。

 

字符串

camel.component.salesforce.apex-query-params

查询 APEX 方法的参数。

 

Map

camel.component.salesforce.apex-url

APEX 方法 URL。

 

字符串

camel.component.salesforce.api-version

Salesforce API 版本。

53.0

字符串

camel.component.salesforce.authentication-type

要使用显式验证方法,USERNAME_PASSWORD、REFRESH_TOKEN 或 JWT 之一。Salesforce 组件可以自动确定要从属性集中使用的身份验证方法,设置此属性以消除任何不确定性。

 

AuthenticationType

camel.component.salesforce.autowired-enabled

是否启用自动关闭。这用于自动关闭选项(选项必须标记为 autowired),方法是在 registry 中查找查找是否有单个匹配类型实例,然后在组件上配置。这可以用于自动配置 JDBC 数据源、JMS 连接工厂、AWS 客户端等。

true

布尔值

camel.component.salesforce.backoff-increment

backoff 间隔递增流连接重启尝试尝试超过 CometD 自动连接。选项是一个长类型。

1000

Long

camel.component.salesforce.batch-id

批量 API 批处理 ID。

 

字符串

camel.component.salesforce.bridge-error-handler

允许将消费者桥接到 Camel 路由错误处理程序,这意味着当消费者试图选择传入消息或类似信息时发生异常,现在将作为消息处理并由路由 Error Handler 处理。默认情况下,使用者将使用 org.apache.camel.spi.ExceptionHandler 来处理例外情况,该处理程序将被记录在 WARN 或 ERROR 级别,并忽略。

false

布尔值

camel.component.salesforce.client-id

Salesforce 实例设置中配置的连接的应用程序的 OAuth Consumer Key。通常,需要配置一个连接的应用程序,但可以通过安装软件包来提供。

 

字符串

camel.component.salesforce.client-secret

Salesforce 实例设置中配置的连接应用程序的 OAuth Consumer Secret。

 

字符串

camel.component.salesforce.composite-method

复合(原始)方法。

 

字符串

camel.component.salesforce.config

全局端点配置 - 用于设置所有端点通用的值。选项是一个 org.apache.camel.component.salesforce.salesforceEndpointConfig 类型。

 

SalesforceEndpointConfig

camel.component.salesforce.content-type

批量 API 内容类型,一个 XML, CSV, ZIP_XML, ZIP_CSV。

 

ContentType

camel.component.salesforce.default-replay-id

如果在 initialReplayIdMap 中没有找到任何值,则默认 replayId 设置。

-1

Long

camel.component.salesforce.enabled

是否启用 Salesforce 组件的自动配置。这默认是启用的。

 

布尔值

camel.component.salesforce.fall-back-replay-id

ReplayId 在 Invalid Replay Id 响应后回退到。

-1

Long

camel.component.salesforce.format

用于 Salesforce API 调用的有效负载格式(JSON 或 XML)默认为 JSON。自 Camel 3.12 起,此选项仅适用于 Raw 操作。

 

PayloadFormat

camel.component.salesforce.http-client

用于连接到 Salesforce 的自定义 Jetty Http 客户端。选项是一个 org.apache.camel.component.salesforce.salesforceHttpClient 类型。

 

SalesforceHttpClient

camel.component.salesforce.http-client-connection-timeout

连接到 Salesforce 服务器时 HttpClient 使用的连接超时。

60000

Long

camel.component.salesforce.http-client-idle-timeout

在等待 Salesforce 服务器响应时,HttpClient 使用的超时。

10000

Long

camel.component.salesforce.http-client-properties

用于设置可以在底层 HTTP 客户端上配置的任何属性。查看 SalesforceHttpClient 和 Jetty HttpClient 的属性,适用于所有可用选项。

 

Map

camel.component.salesforce.http-max-content-length

HTTP 响应的最大内容长度。

 

整数

camel.component.salesforce.http-proxy-auth-uri

对于 HTTP 代理服务器的身份验证,需要匹配代理服务器的 URI,以便 httpProxyUsername 和 httpProxyPassword 用于身份验证。

 

字符串

camel.component.salesforce.http-proxy-excluded-addresses

不应该使用 HTTP 代理服务器的地址列表。

 

Set

camel.component.salesforce.http-proxy-host

要使用的 HTTP 代理服务器的主机名。

 

字符串

camel.component.salesforce.http-proxy-included-addresses

应使用 HTTP 代理服务器的地址列表。

 

Set

camel.component.salesforce.http-proxy-password

用于向 HTTP 代理服务器进行身份验证的密码。

 

字符串

camel.component.salesforce.http-proxy-port

要使用的 HTTP 代理服务器的端口号。

 

整数

camel.component.salesforce.http-proxy-realm

代理服务器的域,用于针对 HTTP 代理服务器的抢占基本/目标身份验证方法。

 

字符串

camel.component.salesforce.http-proxy-secure

如果设置为 false,在访问 HTTP 代理时禁用使用 TLS。

true

布尔值

camel.component.salesforce.http-proxy-socks4

如果设置为 true,请将 HTTP 代理配置为用作 SOCKS4 代理。

false

布尔值

camel.component.salesforce.http-proxy-use-digest-auth

如果在对 HTTP 代理进行身份验证时使用 true Digest 身份验证,否则将使用基本授权方法。

false

布尔值

camel.component.salesforce.http-proxy-username

用于向 HTTP 代理服务器进行身份验证的用户名。

 

字符串

camel.component.salesforce.http-request-buffer-size

HTTP 请求缓冲区大小。对于大型 SOQL 查询,可能需要增加。

8192

整数

camel.component.salesforce.include-details

在 Salesforce1 Analytics 报告中包含详细信息,默认为 false。

 

布尔值

camel.component.salesforce.initial-replay-id-map

重播 ID 以从每个频道名称开始。

 

Map

camel.component.salesforce.instance-id

Salesforce1 分析报告执行实例 ID。

 

字符串

camel.component.salesforce.instance-url

身份验证后使用的 Salesforce 实例的 URL,默认情况下从 Salesforce 身份验证成功接收到。

 

字符串

camel.component.salesforce.job-id

批量 API 作业 ID。

 

字符串

camel.component.salesforce.jwt-audience

使用 OAuth JWT 流时用于 Audience 声明(aud)的值。如果没有设置,则使用登录 URL,在大多数情况下都适合。

 

字符串

camel.component.salesforce.keystore

在 OAuth JWT 流中使用的密钥存储参数。KeyStore 应该仅包含一个带有私钥和证书的条目。Salesforce 不会验证证书链,因此这容易是自签名证书。确保将证书上传到对应的连接的应用程序。选项是 org.apache.camel.support.jsse.KeyStoreParameters 类型。

 

KeyStoreParameters

camel.component.salesforce.lazy-login

如果设置为 true 可防止组件在组件开始时向 Salesforce 进行身份验证。您通常会将其设置为 (默认)false 并早期进行身份验证,并立即了解任何身份验证问题。

false

布尔值

camel.component.salesforce.lazy-start-producer

生成者是否应懒惰启动 (在第一个消息中)。通过懒惰启动,您可以使用此选项来允许 CamelContext 和路由在生成者启动期间启动,并导致路由启动失败。通过懒惰启动,启动失败可以在路由信息时通过 Camel 的路由错误处理程序进行处理。请注意,在处理第一个消息时,创建并启动生成者可能需要稍等时间,并延长处理的总处理时间。

false

布尔值

camel.component.salesforce.limit

对返回的记录数量的限制。适用于某些 API,请参阅 Salesforce 文档。

 

整数

camel.component.salesforce.locator

Salesforce Bulk 2.0 API 提供的检测程序,用于获取查询任务的结果。

 

字符串

camel.component.salesforce.login-config

所有嵌套 Bean 中的身份验证配置,所有的属性也可以直接在组件上设置。选项是一个 org.apache.camel.component.salesforce.salesforceLoginConfig 类型。

 

SalesforceLoginConfig

camel.component.salesforce.login-url

用于身份验证的 Salesforce 实例的 URL,默认为。

 

字符串

camel.component.salesforce.long-polling-transport-properties

用于设置流 api 使用的 BayeuxClient (CometD)使用的 LongPollingTransport 上配置的任何属性。

 

Map

camel.component.salesforce.max-backoff

流连接重启尝试超过 CometD 自动连接的最大 backoff 间隔。选项是一个长类型。

30000

Long

camel.component.salesforce.max-records

为 Bulk 2.0 Query 检索每个结果集合的最大记录数。请求仍受到大小限制的影响。如果您正在使用大量查询结果,您可能会在收到来自 Salesforce 的所有数据前遇到超时。要防止超时,请在 maxRecords 参数中指定客户端希望接收的最大记录数。这会将结果分成较小的集合,使用这个值作为最大大小。

 

整数

camel.component.salesforce.not-found-behaviour

设置从 Salesforce API 接收的 404 not found 状态的行为。应将正文设置为 NULL NotFoundBehaviourHQNULL,或在交换 NotFoundBehaviour EXCEPTION 上发出一个异常信号 - 默认。

 

NotFoundBehaviour

camel.component.salesforce.notify-for-fields

通知字段,选项为 ALL, REFERENCED, SELECT, WHERE。

 

NotifyForFieldsEnum

camel.component.salesforce.notify-for-operation-create

通知创建操作,默认为 false (API 版本 = 29.0)。

 

布尔值

camel.component.salesforce.notify-for-operation-delete

通知删除操作,默认为 false (API 版本 = 29.0)。

 

布尔值

camel.component.salesforce.notify-for-operation-undelete

通知未删除操作,默认为 false (API 版本 = 29.0)。

 

布尔值

camel.component.salesforce.notify-for-operation-update

通知更新操作,默认为 false (API 版本 = 29.0)。

 

布尔值

camel.component.salesforce.notify-for-operations

通知操作,选项为 ALL, CREATE, EXTENDED, UPDATE (API 版本 29.0)。

 

NotifyForOperationsEnum

camel.component.salesforce.object-mapper

自定义 Jackson ObjectMapper,以便在序列化/解码 Salesforce 对象时使用。选项是一个 com.fasterxml.jackson.databind.ObjectMapper 类型。

 

ObjectMapper

camel.component.salesforce.packages

在什么软件包中,生成的 DTO 类。通常,类将使用 camel-salesforce-maven-plugin 生成。如果使用生成的 DTOs,在 parameters/header 值中使用短 SObject 名称的好处,则设置它。可以使用逗号分隔多个软件包。

 

字符串

camel.component.salesforce.password

OAuth 流中使用的密码,以获取访问令牌的访问权限。使用密码 OAuth 流很容易入门,但通常要避免它的安全性,这比其它流安全。如果使用,请确保将安全令牌附加到密码的末尾。

 

字符串

camel.component.salesforce.pk-chunking

使用 PK Chunking。仅用于原始 Bulk API。如果需要,批量 2.0 API 自动执行 PK 块。

 

布尔值

camel.component.salesforce.pk-chunking-chunk-size

用于 PK Chunking 的块大小。如果未指定,则 Salesforce 默认为 100,000。最大大小为 250,000。

 

整数

camel.component.salesforce.pk-chunking-parent

当您为共享对象上的查询启用 PK 块时,请指定父对象。块基于父对象的记录,而不是共享的对象的记录。例如,在查询 AccountShare 时,将 Account 指定为父对象。只要支持父对象,支持 PK 块来共享对象。

 

字符串

camel.component.salesforce.pk-chunking-start-row

指定用作第一个块的下限 15 个字符或 18 个字符记录 ID。在重启批处理之间失败的作业时,请使用此参数指定起始 ID。

 

字符串

camel.component.salesforce.query-locator

当查询结果超过单个调用中检索的记录时,查询 Locator 以供使用。在后续调用中使用这个值来检索其他记录。

 

字符串

camel.component.salesforce.raw-http-headers

以逗号分隔的消息标头列表,以作为 Raw 操作的 HTTP 参数。

 

字符串

camel.component.salesforce.raw-method

用于 Raw 操作的 HTTP 方法。

 

字符串

camel.component.salesforce.raw-path

域名后面的端点 URL 部分。例如,'/services/data/v52.0/sobjects/Account/'。

 

字符串

camel.component.salesforce.raw-payload

在请求和响应中使用原始有效负载字符串(根据格式 JSON 或 XML),而不是 DTOs,默认为 false。

false

布尔值

camel.component.salesforce.raw-query-parameters

以逗号分隔的消息标头列表,以作为 Raw 操作的查询参数。不要 URL-encode 值,因为会自动完成此操作。

 

字符串

camel.component.salesforce.refresh-token

刷新令牌已在刷新令牌 OAuth 流中获取。一个需要设置 Web 应用并配置回调 URL 来接收刷新令牌,或使用内置回调进行配置,然后在流末尾从 URL 撤销 refresh_token。请注意,在开发机构 Salesforce 中,允许在 localhost 上托管回调 Web 应用程序。

 

字符串

camel.component.salesforce.report-id

Salesforce1 分析报告 Id.

 

字符串

camel.component.salesforce.report-metadata

Salesforce1 分析报告元数据进行过滤。选项是一个 org.apache.camel.component.salesforce.api.dto.analytics.reports.ReportMetadata 类型。

 

ReportMetadata

camel.component.salesforce.result-id

批量 API 结果 ID。

 

字符串

camel.component.salesforce.s-object-blob-field-name

SObject blob 字段名称。

 

字符串

camel.component.salesforce.s-object-class

完全限定的 SObject 类名称,通常使用 camel-salesforce-maven-plugin 生成。

 

字符串

camel.component.salesforce.s-object-fields

要检索的 SObject 字段。

 

字符串

camel.component.salesforce.s-object-id

API 需要 SObject ID。

 

字符串

camel.component.salesforce.s-object-id-name

SObject 外部 ID 字段名称。

 

字符串

camel.component.salesforce.s-object-id-value

SObject 外部 ID 字段值。

 

字符串

camel.component.salesforce.s-object-name

API 需要或支持 SObject 名称。

 

字符串

camel.component.salesforce.s-object-query

Salesforce SOQL 查询字符串。

 

字符串

camel.component.salesforce.s-object-search

Salesforce SOSL 搜索字符串。

 

字符串

camel.component.salesforce.ssl-context-parameters

要使用的 SSL 参数,请参阅 SSLContextParameters 类以了解所有可用选项。选项是 org.apache.camel.support.jsse.SSLContextParameters 类型。

 

SSLContextParameters

camel.component.salesforce.update-topic

在使用流 API 时是否更新现有的 Push 主题,默认为 false。

false

布尔值

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

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

false

布尔值

camel.component.salesforce.user-name

OAuth 流中使用的用户名,以获取访问令牌的访问权限。使用密码 OAuth 流很容易入门,但通常要避免它的安全性,这比其它流安全。

 

字符串

camel.component.salesforce.worker-pool-max-size

用于处理 HTTP 响应的线程池的最大大小。

20

整数

camel.component.salesforce.worker-pool-size

用于处理 HTTP 响应的线程池大小。

10

整数

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat