I am using spring-data-dynamodb Spring Data extension to integrate AWS DynamDB with Spring Boot 2.0. I was able to make it work.
My question is, is there a way that the table is automatically created on application startup if it doesn't already exists, similar to what Hiberate offers via hibernate.hbm2ddl.auto
?. Right now, I have to create the table manually or in the application using the AWS DynamoDB sdk. Many Thanks.
Create a DynamoDB Table on AWS Console and add a sample value. Setup the Java Spring Boot Micro Service on your local using Spring Initializr. Integrate the DynamoDB code into your Java Application using AWS SDK and successfully read the sample value.
DynamoDB would then automatically replicate data changes among those tables so that changes to CustomerProfiles data in one Region would seamlessly propagate to the other Regions.
The primary goal of the Spring® Data project is to make it easier to build Spring-powered applications that use data access technologies. This module deals with enhanced support for a data access layer built on AWS DynamoDB. Technical infos can be found on the project page.
You can use Hibernate to map object-oriented domain models to a traditional relational database. The tutorial below shows how to use the CData JDBC Driver for Amazon DynamoDB to generate an ORM of your Amazon DynamoDB repository with Hibernate.
Right now there is no such feature but there is an open feature request: https://github.com/derjust/spring-data-dynamodb/issues/17 (which I'm actually working on these days)
Note: I'm the maintainer of this GitHub project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With