0

我应该添加什么依赖项org.apache.camel.component.http.HttpMethods才能添加到我的 Spring Boot 项目中?我已经尝试过这些,但这些似乎都没有工作......

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 

另外,我找不到对谷歌搜索的依赖。

4

2 回答 2

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
于 2018-09-10T16:55:31.287 回答
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>
于 2018-09-10T17:07:51.940 回答