Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuration of RelProvider in RepositoryResourceMappings [DATAREST-1076] #1441

Closed
spring-projects-issues opened this issue May 16, 2017 · 2 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented May 16, 2017

Erick opened DATAREST-1076 and commented

Currently the RepositoryResourceMappings class creates a new instance of the EvoInflectorRelProvider, and the other constructor has been marked package protected leaving no way to customize the RelProvider.

public RepositoryResourceMappings(Repositories repositories, PersistentEntities entities, RepositoryDetectionStrategy strategy) {
    this(repositories, entities, new EvoInflectorRelProvider(), strategy);
}

Backported to: 2.6.4 (Ingalls SR4)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 16, 2017

Oliver Drotbohm commented

Good point, we can certainly do that. RepositoryRestMvcConfiguration already accesses the RelProvider set up by Spring HATEOAS and could forward that to the RepositoryResourceMappings. Do you think that'd be enough for your customization needs?

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented May 18, 2017

Oliver Drotbohm commented

Looks like forwarding the configured RelProvider instances is not an option as the RepositoryResourceMapping instances act as a source for the RepositoryRelProvider which would then create a resolution cycle. I'll go ahead with the constructor exposure though. I'll also add a hook to RepositoryRestConfiguration so that the RelProvider to be used as default for repositories can be configured without having to extend RepositoryRestMvcConfiguration using a simple RepositoryRestConfigurer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants