要为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搜索的依赖。
答案 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>