Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发送短信报错 #8

Open
shaobohan917 opened this issue Aug 7, 2023 · 2 comments
Open

发送短信报错 #8

shaobohan917 opened this issue Aug 7, 2023 · 2 comments

Comments

@shaobohan917
Copy link

shaobohan917 commented Aug 7, 2023

`// Asynchronously get the return value of the API request

CompletableFuture response = client.sendSms(sendSmsRequest);

// Synchronously get the return value of the API request

SendSmsResponse resp = response.get();`

执行到resonse.get()时,报错:
java.lang.NoClassDefFoundError: org/apache/hc/client5/http/async/methods/SimpleRequestBuilder

@YMingPro
Copy link

YMingPro commented Apr 9, 2024

我也遇到了。jdk8,springboot2.5.8

@YMingPro
Copy link

YMingPro commented Apr 9, 2024

org/apache/hc/client5/http/async/methods/SimpleRequestBuilder

最终重新统一apache的包得以解决

<dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
            <version>5.1.2</version> <!-- 替换为你所需的版本 -->
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.core5</groupId>
            <artifactId>httpcore5-h2</artifactId>
            <version>5.1.2</version> <!-- 替换为你所需的版本 -->
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.core5</groupId>
            <artifactId>httpcore5</artifactId>
            <version>5.1.2</version> <!-- 替换为你所需的版本 -->
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.core5</groupId>
            <artifactId>httpcore5-reactive</artifactId>
            <version>5.1.2</version> <!-- 替换为你所需的版本 -->
        </dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants