【发布时间】:2020-11-24 09:13:00
【问题描述】:
我正在使用 Apache Camel Spring DSL 通过 HTTPS 调用 REST 服务。该应用程序是一个 Spring Boot 应用程序,并且在 pom.xml 中添加了依赖 camel-http。我有证书文件 Test.p12 和证书的密码。要在调用 HTTPS URL 时添加证书,我按照中给出的说明进行操作
https://camel.apache.org/components/latest/http-component.html
并尝试添加以下 bean 定义:
<camel:sslContextParameters
id="sslContextParameters">
<camel:keyManagers
keyPassword="keyPassword">
<camel:keyStore
resource="/users/home/server/keystore.jks"
password="keystorePassword"/>
</camel:keyManagers>
</camel:sslContextParameters>
但无法创建 bean。谁能指导我如何在 Camel 中使用 HTTPS 调用 REST 服务以及如何在调用时添加证书?
【问题讨论】:
-
有什么异常?
-
sslContextParameters 在 XML 中未被识别
标签: spring-boot rest https apache-camel ssl-certificate