java - org.apache.camel.impl.HeaderFilterStrategyComponent 类型无法解析
问题描述
我的骆驼应用程序遇到以下问题:
该项目未构建,因为其构建路径不完整。找不到 org.apache.camel.impl.HeaderFilterStrategyComponent 的类文件。修复构建路径然后尝试构建这个项目骆驼
public class SendMessageToActiveMq {
public static void main(String[] args) throws Exception {
ConnectionFactory factory = new ActiveMQConnectionFactory();
CamelContext context = new DefaultCamelContext();
context.addComponent("jms", JmsComponent.jmsComponentAutoAcknowledge(factory));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
}
这是我的 maven pom 依赖项:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>5.15.11</version>
</dependency>
注意: 它确实适用于骆驼核心 2.24.2。为什么它不适用于 3.0.0?什么是替代方案?
解决方案
根据 Camel 3迁移指南。activemq-camel 组件已移至 Apache Camel 代码库。更新您的依赖项,例如:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-activemq</artifactId>
<version>3.0.0</version>
</dependency>
推荐阅读
- sas - 一旦多个变量满足条件,就放弃观察
- python - 使用 MongoEngine - Python Flask 从主文档中按字符串嵌入文档进行过滤
- batch-file - 执行计划任务操作的服务
- python - else 命令运行不正确?(Python 3 初学者)
- pointers - golang return []*TreeNode{} 和 return []*TreeNode{nil} 有什么区别
- r - 向图形添加图例和平滑
- r - 使用 R 和 tidyverse 中的代码对数据进行编码并更改另一列中的列名
- c - 同一个suid+系统程序,不同系统输出不同
- python - 将 Web 服务器集成到 python 脚本中
- c# - 在 C# 中通过 HTTP POST 请求发送动态对象