46.21. Spring Boot Auto-Configuration
当在 Spring Boot 中使用 tmux 时,请确保使用以下 Maven 依赖项来支持自动配置:
<dependency> <groupId>org.apache.camel.springboot</groupId> <artifactId>camel-salesforce-starter</artifactId> </dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-salesforce-starter</artifactId>
</dependency>
组件支持 91 个选项,如下所列。
名称 | 描述 | 默认 | 类型 |
---|---|---|---|
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 auto-reconnect 失败。选项是一个长类型。 | 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 消费者密钥。通常,需要配置连接的应用程序,但可以通过安装软件包来提供。 | 字符串 | |
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、ZZ_XML、ZZ_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 在无效 Replay Id 响应后回退到。 | -1 | Long |
camel.component.salesforce.format | 用于 Salesforce API 调用的有效负载格式(JSON 或 XML)默认为 JSON。自 Camel 3.12 起,此选项仅适用于 Raw 操作。 | PayloadFormat | |
camel.component.salesforce.http-client | 自定义 Jetty Http Client 用于连接到 Salesforce。选项是 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 | HttpClient 在等待 Salesforce 服务器响应时使用的超时。 | 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 代理服务器抢占 Basic/Digest 身份验证方法。 | 字符串 | |
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 | 如果设置为 true Digest 身份验证,将在向 HTTP 代理进行身份验证时使用,否则将使用基本授权方法。 | false | 布尔值 |
camel.component.salesforce.http-proxy-username | 用于针对 HTTP 代理服务器进行身份验证的用户名。 | 字符串 | |
camel.component.salesforce.http-request-buffer-size | HTTP 请求缓冲区大小。对于大型 SOQL 查询,可能需要增加。 | 8192 | 整数 |
camel.component.salesforce.include-details | 在 Salesforce1 分析报告中包含详细信息,默认为 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 | 制作者是否应启动 lazy (在第一个消息中)。通过启动 lazy,您可以使用此选项来允许 CamelContext 和路由在制作者启动期间启动,并导致路由启动失败。通过将这个启动延迟到延迟,那么可以通过 Camel 的路由错误处理程序路由消息期间,可以处理启动失败。请注意,在处理第一个消息时,创建并启动制作者可能需要稍等时间,并延长处理的总处理时间。 | false | 布尔值 |
camel.component.salesforce.limit | 对返回的记录数量限制。适用于某些 API,检查 Salesforce 文档。 | 整数 | |
camel.component.salesforce.locator | assumes 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 auto-reconnect 之外的失败流连接重启尝试的最大 backoff 间隔。选项是一个长类型。 | 30000 | Long |
camel.component.salesforce.max-records | 为 Bulk 2.0 Query 检索每个结果的最大记录数。请求仍会受到大小限制。如果您正在使用大量查询结果,在接收来自 Salesforce 的所有数据之前可能会出现超时问题。要防止超时,请指定客户端预期在 maxRecords 参数中接收的最大记录数。这会将结果分成较小的集合,其值为最大大小。 | 整数 | |
camel.component.salesforce.not-found-behaviour | 设置从 Salesforce API 收到的 404 尚未找到的状态。如果正文设置为 NULL NotFoundBehaviour#NULL,或者应在 Exchange NotFoundBehaviour#EXCEPTION 上发送一个例外。 | NotFoundBehaviour | |
camel.component.salesforce.notify-for-fields | 通知字段,选项为 ALL、REFERENCED、SELECT、WHERE。 | NotifyForFieldsEnum | |
camel.component.salesforce.notify-for-operation-create | notify for create operation,默认为 false (API version = 29.0)。 | 布尔值 | |
camel.component.salesforce.notify-for-operation-delete | 通知删除操作,默认为 false (API 版本 = 29.0)。 | 布尔值 | |
camel.component.salesforce.notify-for-operation-undelete | notify for un-delete 操作,默认为 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 搭配使用的块大小。如果未指定,reforced 默认为 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 | 当查询结果超过一个调用中检索记录时,查询为使用查询器提供的查询定位器。在后续调用中使用这个值来检索其他记录。 | 字符串 | |
camel.component.salesforce.raw-http-headers | 以逗号分隔的消息标头列表,以包含 作为 Raw 操作的 HTTP 参数。 | 字符串 | |
camel.component.salesforce.raw-method | 用于 Raw 操作的 HTTP 方法。 | 字符串 | |
camel.component.salesforce.raw-path | 域名后面的端点 URL 部分。E.g., '/services/data/v52.0/sobjects/Account/'. | 字符串 | |
camel.component.salesforce.raw-payload | 使用原始有效负载字符串作为请求和响应(默认情况下,JSON 或 XML 取决于格式),而不是 DTOs。 | 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 | 在使用 Streaming API 时是否更新现有的 Push Topic,默认为 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 | 整数 |