forked from michaellavelle/spring-data-dynamodb
-
Notifications
You must be signed in to change notification settings - Fork 141
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
to be exposed as a Spring Bean.
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();
}
}