forked from michaellavelle/spring-data-dynamodb
-
Notifications
You must be signed in to change notification settings - Fork 140
Spring Data REST
Sebastian J edited this page Jun 12, 2018
·
6 revisions
spring-data-dynamodb
is compatible with Spring Data REST.
It uses a PersistentEntityResourceAssembler
that requires the [
DynamoDBMappingContext`](https://github.com/derjust/spring-data-dynamodb/blob/master/src/main/java/org/socialsignin/spring/data/dynamodb/mapping/DynamoDBMappingContext.java) to be exposed as a Spring Bean.
To use spring-data-rest
, an 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();
}
}