Spring Boot应用程序对org.apache.camel.component.http.HttpMethods的Maven依赖性是什么?

时间:2018-09-10 16:53:02

标签: spring-boot apache-camel maven-dependency

要为org.apache.camel.component.http.HttpMethods添加到Spring引导项目中,我应该添加什么依赖关系?我已经尝试了这些,但是这些似乎都没有起作用...

https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
https://mvnrepository.com/artifact/org.apache.camel/camel-http 
https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient 

此外,我找不到对Google搜索的依赖。

2 个答案:

答案 0 :(得分:1)

org.apache.camel.component.http.HttpMethods可在org.apache.camel:camel-http工件中找到。

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-http</artifactId>
  <version>2.22.1</version>
</dependency>

我不确定您为什么会说它不存在:

$ zipinfo -1 camel-http-2.22.1.jar | grep HttpMethods
org/apache/camel/component/http/HttpMethods.class

答案 1 :(得分:0)

我认为您应该将这些依赖项添加到您的项目中:

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-spring-boot-starter</artifactId>
  <version>${camel.version}</version> <!-- the camel version -->
</dependency>

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-http-starter</artifactId>
  <version>${camel.version}</version> <!-- the camel version -->
</dependency>