Skip to content

Include Spring Data REST endpoints in /mappings #4541

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

Closed
wilkinsona opened this issue Nov 18, 2015 · 4 comments
Closed

Include Spring Data REST endpoints in /mappings #4541

wilkinsona opened this issue Nov 18, 2015 · 4 comments
Labels
status: duplicate A duplicate of another issue

Comments

@wilkinsona
Copy link
Member

No description provided.

@wilkinsona wilkinsona added the type: enhancement A general enhancement label Nov 18, 2015
@htynkn
Copy link
Contributor

htynkn commented Feb 19, 2016

I check the related code and I find the reason why spring data rest endpoint didn't included in mappings is RepositoryRestHandlerMapping is not exported as a bean. If it export as a bean, RequestMappingEndpoint can get all the information by extractMethodMappings method.

The only instance of RepositoryRestHandlerMapping is created byRepositoryRestMvcConfiguration, but this file is out of spring-boot. It's a part of spring-data-rest-webmvc.

If we can ask them to export RepositoryRestHandlerMapping as a bean, it will be easy for us. Or we can treat Spring Data REST endpoints as an exceptional case and add some code of it in RequestMappingEndpoint.

Do you have any advice? @wilkinsona

@wilkinsona
Copy link
Member Author

Spring Data REST already exposes its handler mapping as a bean, but it's a DelegatingHandlerMapper rather than one of the types the the Actuator can already introspect. RepositoryRestHandlerMapper is one of the delegates so I don't think it can be exposed as a bean as, if it was, some of the mappings would be exposed twice.

We either need to use reflection to look inside DelegatingHandlerMapping or we need an official API for accessing its delegates.

@wilkinsona
Copy link
Member Author

I've opened DATAREST-1136 to hopefully get an official API for accessing the delegates.

@wilkinsona
Copy link
Member Author

As of #9979, mappings from Spring Data REST are now available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants