Skip to content
Sebastian J edited this page Jun 12, 2018 · 6 revisions

Introduction

spring-data-dynamodb is compatible with Spring Data REST. It uses a PersistentEntityResourceAssembler that requires the DynamoDBMappingContext to be exposed as a Spring Bean.

Usage

To use Spring Data REST, the additional Bean must be registered. If such a bean is already available in the ApplicationContext it still has to registered via the mappingContextRef!:

@Configuration
@EnableDynamoDBRepositories(mappingContextRef = "dynamoDBMappingContext")
public class DynamoDBConfig {

	/* ... other beans like AmazonDynamoDB ... */

        @Bean
        public DynamoDBMappingContext dynamoDBMappingContext() {
               return new DynamoDBMappingContext();
        }
}