Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 无法在apache camel中解析终结点_Spring_Apache Camel - Fatal编程技术网

Spring 无法在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

我正在开发一个spring mvc应用程序,我正在使用apache camel发送消息。当我在测试用例中运行我的代码时,它向我显示解析端点失败的错误。这是我的代码:

  CamelContext camelContext = new DefaultCamelContext();
    ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
    producerTemplate.requestBody(
            "jetty:http://here my message service http api",
            "hello", String.class);
当您在Camel中看到类似“未能解析端点”的错误时,很可能是因为您的Maven
pom.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文件或您使用的构建工具中。