diff --git a/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/DynamoDBEnhancedClientsFactory.java b/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/DynamoDBEnhancedClientsFactory.java index 9504f9ca1..82b0724ee 100644 --- a/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/DynamoDBEnhancedClientsFactory.java +++ b/subprojects/micronaut-amazon-awssdk-dynamodb/src/main/java/com/agorapulse/micronaut/amazon/awssdk/dynamodb/DynamoDBEnhancedClientsFactory.java @@ -21,11 +21,14 @@ import io.micronaut.context.annotation.Factory; import software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedAsyncClient; import software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient; +import software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClientExtension; import software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient; import software.amazon.awssdk.services.dynamodb.DynamoDbClient; import jakarta.inject.Singleton; +import java.util.List; + /** * Factory class which provides * {@link software.amazon.awssdk.enhanced.dynamodb.internal.client.DefaultDynamoDbEnhancedClient} and @@ -36,14 +39,14 @@ public class DynamoDBEnhancedClientsFactory { @Bean @Singleton - public DynamoDbEnhancedClient dynamoDbEnhancedClient(DynamoDbClient dynamoDbClient) { - return DynamoDbEnhancedClient.builder().dynamoDbClient(dynamoDbClient).build(); + public DynamoDbEnhancedClient dynamoDbEnhancedClient(DynamoDbClient dynamoDbClient, List extensions) { + return DynamoDbEnhancedClient.builder().dynamoDbClient(dynamoDbClient).extensions(extensions).build(); } @Bean @Singleton - public DynamoDbEnhancedAsyncClient dynamoDbEnhancedAsyncClient(DynamoDbAsyncClient dynamoDbAsyncClient) { - return DynamoDbEnhancedAsyncClient.builder().dynamoDbClient(dynamoDbAsyncClient).build(); + public DynamoDbEnhancedAsyncClient dynamoDbEnhancedAsyncClient(DynamoDbAsyncClient dynamoDbAsyncClient, List extensions) { + return DynamoDbEnhancedAsyncClient.builder().dynamoDbClient(dynamoDbAsyncClient).extensions(extensions).build(); } }