我使用Apache Camel Spring DSL通过HTTPS调用REST服务。该应用程序是一个Spring Boot应用程序,并且依赖项camel-http添加到pom.xml中。我有证书文件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服务,以及如何在调用时添加证书?
发布于 2020-11-25 23:25:17
在应用程序的YAML (或属性)文件中查看SSLContextParameters的Spring-Boot配置。
你可以在bottom of this page上找到它。
https://stackoverflow.com/questions/64983395
复制相似问题