Skip to content

Expand use of DynamoDB table prefix in auto-configuration #826

@acollins4-chwy

Description

@acollins4-chwy

Type: Feature

Is your feature request related to a problem? Please describe.
The resolution to the #725 issue (#726) did a good job of addressing the missing table-prefix property, but it over-indexed on making use of the DynamoDbTemplate more convenient and missed an easy opportunity to expand the influence of this new property.

Describe the solution you'd like
I feel like utilizing something like the code below in the DynamoDbAutoConfiguration would optimize the number of auto-configuration opportunities (beyond DynamoDbTemplate):

@ConditionalOnMissingBean
@Bean
public DynamoDbTableNameResolver dynamoDbTableNameResolver(DynamoDbProperties properties) {
  return new DefaultDynamoDbTableNameResolver(properties.getTablePrefix());
}

Describe alternatives you've considered
An alternative I considered was calling DynamoDbProperties.getTablePrefix() from inside of a DefaultDynamoDbTableNameResolver, but this does not fit the pattern used for other Spring beans within this project.

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions