第 54 章 Salesforce
支持生成者和消费者
此组件支持生成者和消费者端点,以便使用 Java DTOs 与 Salesforce 进行通信。
存在一个生成这些 DTO 的companion maven 插件 Camel Salesforce 插件(请参阅以下内容)。
Maven 用户必须在其 pom.xml
中为这个组件添加以下依赖项:
默认情况下,camel-salesforce-maven-plugin
使用 TLSv1.3 与 salesforce 交互。TLS 版本可在插件上配置。FIPS 用户可以配置属性 sslContextParameters.secureSocketProtocol。
要使用 maven-plugin
,您必须将以下依赖项添加到 pom.xml
文件中。
Developers wishing to contribute to the component are instructed to look at the link:https://github.com/apache/camel/tree/main/components/camel-salesforce/camel-salesforce-component/README.md[README.md] file on instructions on how to get started and setup your environment for running integration tests.
Developers wishing to contribute to the component are instructed to look at the link:https://github.com/apache/camel/tree/main/components/camel-salesforce/camel-salesforce-component/README.md[README.md] file on instructions on how to get started and setup your environment for running integration tests.
54.1. 配置选项 复制链接链接已复制到粘贴板!
Camel 组件在两个独立级别上配置:
- 组件级别
- 端点级别
54.1.1. 配置组件选项 复制链接链接已复制到粘贴板!
组件级别是最高级别,它包含端点继承的常规配置。例如,一个组件可能具有安全设置、用于身份验证的凭证、用于网络连接的 url 等等。
某些组件只有几个选项,其他组件可能会有许多选项。由于组件通常已配置了常用的默认值,因此通常只需要在组件上配置几个选项,或者根本不需要配置任何选项。
可以在配置文件(application.properties|yaml)中使用 组件 DSL 配置组件,也可直接使用 Java 代码完成。
54.1.2. 配置端点选项 复制链接链接已复制到粘贴板!
您发现自己在端点上配置了一个,因为端点通常有许多选项,允许您配置您需要的端点。这些选项被分别分类为:端点作为消费者(来自)被使用,和作为生成者(到)使用,或被两者使用。
配置端点通常在端点 URI 中作为路径和查询参数直接进行。您还可以使用 Endpoint DSL 作为配置端点的安全方法。
在配置选项时,最好使用 Property Placeholders,它不允许硬编码 URL、端口号、敏感信息和其他设置。换句话说,占位符允许从您的代码外部配置,并提供更多灵活性和重复使用。
以下两节列出了所有选项,首为于组件,后跟端点。