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](https://docs.spring.io/spring-data/rest/docs/current/api/org/springframework/data/rest/webmvc/PersistentEntityResourceAssembler.html)
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();
}
}