【发布时间】:2024-04-30 14:05:02
【问题描述】:
跟随https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-java?tabs=powershell 得到这个错误:
Caused by: java.lang.IllegalStateException: A request was made to load the default HttpClient provider but one could not be found on the classpath. If you are using a dependency manager, consider including a dependency on azure-core-http-netty or azure-core-http-okhttp. Depending on your existing dependencies, you have the choice of Netty or OkHttp implementations. Additionally, refer to https://aka.ms/azsdk/java/docs/custom-httpclient to learn about writing your own implementation.
at com.azure.core.implementation.http.HttpClientProviders.createInstance(HttpClientProviders.java:37)
at com.azure.core.http.HttpClient.createDefault(HttpClient.java:27)
at com.azure.core.http.HttpPipelineBuilder.build(HttpPipelineBuilder.java:60)
at com.azure.storage.blob.implementation.util.BuilderHelper.buildPipeline(BuilderHelper.java:110)
at com.azure.storage.blob.BlobServiceClientBuilder.buildAsyncClient(BlobServiceClientBuilder.java:107)
at com.azure.storage.blob.BlobServiceClientBuilder.buildClient(BlobServiceClientBuilder.java:84)
【问题讨论】:
-
错误抛出:BlobServiceClient blobServiceClient = new BlobServiceClientBuilder().endpoint("azuremlexamples.blob.core.windows.net").buildClient();
标签: java azure azure-storage azure-blob-storage