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

问题描述 投票:0回答:2

我应该添加什么依赖关系才能将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 

此外,我找不到依赖谷歌搜索。

spring-boot apache-camel maven-dependency
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

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>
© www.soinside.com 2019 - 2024. All rights reserved.