DATAREST-1076 - Expose constructor that takes RelProvider of RepositoryResourceMappings.

We now expose the constructor that takes a RelProvider in RepositoryResourceMappings so that clients can tweak the default relation names. Changed the order of constructor parameters of (previously) non-public constructors for consistency.

The RelProvider to be used with the mappings can now be configured via RepositoryRestConfiguration and defaults to the EvoInflector based one.
This commit is contained in:
Oliver Gierke
2017-05-17 07:29:46 +02:00
parent 0813faf0d5
commit 1f95a3387b
6 changed files with 29 additions and 13 deletions

View File

@@ -616,7 +616,7 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon
@Bean
public RepositoryResourceMappings resourceMappings() {
return new RepositoryResourceMappings(repositories(), persistentEntities(),
config().getRepositoryDetectionStrategy());
config().getRepositoryDetectionStrategy(), config().getRelProvider());
}
/**