【发布时间】:2023-03-07 16:53:02
【问题描述】:
我正在尝试使用 Apache Camel 调用一个简单的 shell 脚本,但出现错误:
Failed to resolve endpoint: exec:///usr/local/karaf/data/tmp/test.sh due to: No component found with scheme: exec
在我的 camel-context.xml 中有
<route id="common_route">
<from uri="direct:common_route" />
<to uri="exec:/usr/local/karaf/data/tmp/test.sh"/>
</route>
在我的 pom.xml 中
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-exec</artifactId>
<version>${camel.version}</version>
</dependency>
我们使用的是 Camel 版本 2.15.3。我们正在使用 Spring Camel。 有任何想法吗?这是必须如此简单以至于非常令人沮丧的事情之一。
顺便说一句,如果我使用它没有区别
exec:/usr/....
或者
exec:///usr/....
提前致谢。
【问题讨论】: