小编ner*_*ner的帖子

software.amazon.awssdk.core.exception.SdkClientException

当我尝试调用 DynamoDB AWS 服务时,出现以下错误:

Multiple HTTP implementations were found on the classpath. To avoid non-deterministic loading implementations, please explicitly provide an HTTP client via the client builders, set the software.amazon.awssdk.http.service.impl system property with the FQCN of the HTTP service to use as the default, or remove all but one HTTP implementation from the classpath
Run Code Online (Sandbox Code Playgroud)

我正在使用DynamoDbClient

我的 pom.xml:

       <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>dynamodb</artifactId>
        </dependency>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>url-connection-client</artifactId>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

客户端配置:

@Singleton
public class DynamoClientConfig {

    @Produces
    @ApplicationScoped
    public DynamoDbClient getClientDb() {
        return DynamoDbClient.builder().region(Region.SA_EAST_1).build(); …
Run Code Online (Sandbox Code Playgroud)

java amazon-web-services amazon-dynamodb spring-boot quarkus

11
推荐指数
1
解决办法
2万
查看次数