0

Let's say I have a case when I need to use different DynamoDb tables with different environments. For example, I want to have DevTable on dev and ProdTable on prod.

So, is there any way to use custom DynamoDBMapper with spring-data repositories?

1 Answer 1

1

DynamoDBMapperConfig provides a way to override the TableName specified on the Entity object using @DynamoDBTable annotation, through TableNameOverride class.

You can define a TableNameOverride bean that modifies the table name at runtime, in your spring-data based application. See https://github.com/derjust/spring-data-dynamodb/wiki/Alter-table-name-during-runtime.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.