Spring 无法在apache camel中解析终结点
我正在开发一个spring mvc应用程序,我正在使用apache camel发送消息。当我在测试用例中运行我的代码时,它向我显示解析端点失败的错误。这是我的代码:Spring 无法在apache camel中解析终结点,spring,apache-camel,Spring,Apache Camel,我正在开发一个spring mvc应用程序,我正在使用apache camel发送消息。当我在测试用例中运行我的代码时,它向我显示解析端点失败的错误。这是我的代码: CamelContext camelContext = new DefaultCamelContext(); ProducerTemplate producerTemplate = camelContext.createProducerTemplate(); producerTemplate.requestBod
CamelContext camelContext = new DefaultCamelContext();
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
producerTemplate.requestBody(
"jetty:http://here my message service http api",
"hello", String.class);
当您在Camel中看到类似“未能解析端点”的错误时,很可能是因为您的Mavenpom.xml
中缺少依赖项声明。在您的情况下,请确保您的pom.xml
具有以下依赖项:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jetty9</artifactId>
<version>${camel.version}</version>
</dependency>
org.apache.camel
驼峰码头9
${camel.version}
请提供有关错误的更多信息。您可以发布您的路线吗?可能是类路径上没有camel jetty,请将其添加到maven pom.xml文件或您使用的构建工具中。