Skip to content

Improve Extensibility of DynamoDbTemplate by Allowing Access to PrepareTable and Core Fields #1482

@yeDor

Description

@yeDor

Type: Feature

Description: I am currently working with the DynamoDbTemplate class in Spring Cloud AWS for DynamoDB operations. While the class itself is not declared as final, practical extensibility is severely limited because of the following:

  • Key fields inside DynamoDbTemplate are declared private without protected getters.
  • The important method prepareTable is private and cannot be overridden or accessed by subclasses.
  • These design decisions effectively prevent subclassing and extending the functionality

Describe the solution you'd like

  • Consider changing the visibility of key internal fields from private to protected or provide protected accessor methods.
  • Change prepareTable from private to protected and allow overriding by subclasses.
  • Optionally, introduce extension hooks or template method patterns for customization points.

Describe alternatives you've considered
Fallback to using DynamoDbEnhancedClient

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions