我应该添加什么依赖关系才能将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
此外,我找不到依赖谷歌搜索。
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
我认为你应该将这些依赖项添加到你的项目中:
<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>