gpt4 book ai didi

java - 在带有 Maven 的 Java 项目中使用 AsyncHttpClient

转载 作者:行者123 更新时间:2023-12-02 05:35:09 24 4
gpt4 key购买 nike

我正在 Eclipse 中使用 Maven 创建一个 java 项目。我必须使用库 AsyncHttpClient ( https://github.com/AsyncHttpClient/async-http-client )。我已经在 pom.xml 文件中输入了该库的依赖项。我需要 org.asynchttpclient.uri 包中存在的 UriComponents 类,但我无法导入它。我做到了:

import org.asynchttpclient.uri.UriComponents; 

但是我收到一个错误。

这是我需要的类(class)的链接:

UriComponents.java

如何导入它?谢谢。

这是我当前的 pom:

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns="maven.apache.org/POM/4.0.0";
xmlns:xsi="w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/xsd/maven-4.0.0.xsd">;
<modelVersion>4.0.0</modelVersion>
...
<dependency>
<groupId>com.ning</groupId>
<artifactId>async-http-client</artifactId>
<version>1.8.12</version>
</dependency>
...

最佳答案

它的版本为 1.9.0-BETA6,位于 com.ning.http.client.uri.UriComponents

您请求的似乎在 master 分支中,并且尚未发布。

查看论坛 https://groups.google.com/forum/#!forum/asynchttpclient

关于java - 在带有 Maven 的 Java 项目中使用 AsyncHttpClient,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25054601/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com