spring-boot - 使用 Spring-Boot 的 Apache Camel 全局 SSL 配置
问题描述
我正在努力让全局 SSL 配置正常工作。我在 Spring Boot 中运行 Apache Camel。似乎 application.yml 中的配置被忽略了。不创建 SSL 上下文,并且忽略 http 组件的 use-global-ssl-context-parameter。
版本
- 弹簧启动:2.1.9-RELEASE
- 阿帕奇骆驼:2.24.2
pom中包含的依赖项:
- 骆驼弹簧靴
- 骆驼弹簧启动器
- 骆驼http-starter
配置(application.yml)
camel:
# To enable global SSL in undertow
component:
http:
use-global-ssl-context-parameters: true
ssl:
config:
key-managers:
key-password: "changeit"
key-store:
resource: "/keystore.p12"
password: "changeit"
type: "PKCS12"
trust-managers:
key-store:
resource: "/cacerts"
password: "changeit"
type: "jks"
这是一个专门为测试全局 SSL 上下文创建而创建的干净项目。
看来我在某处错过了一步?
协助表示赞赏。
解决方案
更换 camel-http 组件 camel-http4 解决了这个问题。我的理解是不推荐使用camel-http。
推荐阅读
- python - Python OpenCV:从 ROS 返回 cvBridge 图像
- ios - SIGABRT 因为 FBSDK
- angular - 在 ionic 3 中以编程方式打开条形码扫描仪
- povray - 渲染非常小的物体时没有阴影
- java - 从 main 方法访问抽象类变量
- javascript - 如何存根返回类的类?
- java - 泛型类型实例化和 Lambda
- laravel - 通过第三台服务器对 api 进行 JWT 授权
- html - 带有 Bulma CSS 的 Angular 6 渲染没有 Bulma 样式的 HTML 元素
- google-chrome - 为什么 chrome.sync.set 只更新一次值