DATAREST-577 - Excerpt projections are now configured automatically.
Excerpt projections defined in @RepositoryRestResource had to be discoverable (i.e. located in a sub-package of the domain type). RepositoryRestMvcConfiguration now uses an newly introduced constructor of ProjectionDefinitionConfiguration that automatically registers all projects in the given ResourceMappings.
This commit is contained in:
@@ -217,8 +217,9 @@ public class RepositoryRestMvcConfiguration extends HateoasAwareSpringDataWebCon
|
||||
@Bean
|
||||
public RepositoryRestConfiguration config() {
|
||||
|
||||
ProjectionDefinitionConfiguration configuration = new ProjectionDefinitionConfiguration();
|
||||
ProjectionDefinitionConfiguration configuration = new ProjectionDefinitionConfiguration(resourceMappings());
|
||||
|
||||
// Register projections found in packages
|
||||
for (Class<?> projection : getProjections(repositories())) {
|
||||
configuration.addProjection(projection);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user