quarkiverse / quarkus-amazon-services

Quarkus Amazon Services extensions
Apache License 2.0
39 stars 48 forks source link

@NamedDynamoDbTable applicable to parameters would enable constructor injection #1408

Open scrocquesel opened 2 hours ago

scrocquesel commented 2 hours ago

Copy from https://github.com/quarkusio/quarkus/issues/42647#issue-2475465827

Description Currently it is not possible to have

private final DynamoDbTable fooTable;

FooDao(@NamedDynamoDbTable("Foo") fooTable) { this.fooTable = fooTable }

Because @NamedDynamoDbTable is not applicable to method parameters. Would this be feasible?

Implementation ideas No response

scrocquesel commented 2 hours ago

@nicklasweasel For implementation ideas, you can wider the targets of the annotation and add support for them here

https://github.com/quarkiverse/quarkus-amazon-services/blob/e17bb8c75d4ad34726618478e228faabebbbbb93/dynamodb-enhanced/deployment/src/main/java/io/quarkus/amazon/dynamodb/enhanced/deployment/DynamodbEnhancedDbTableProcessor.java#L79