spring-projects / spring-projects/spring-hateoas
entitylinks not extends ordered so it cant not sort
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
currently EntityLinks (ControllerEntityLink,RepositoryEntityLinks) not implement ordered interface and no Order annotation.
so when we use the default DelegatingEntityLinks ,it use PluginRegistryFactoryBean to wrap entityLinks list(internal use a OrderAwarePluginRegistry to sort), but cant not sort, and the findOrder return null(Long) and (lowestorder long).
the behavior at 0.23 and 0.25 work not the same. when i use 0.23, the order is RepositoryEntityLink, ControllerEntityLink, jaxControllerLink. but 0.25 the RepositoryEntityLink order the last! so when i use spring data rest, the /api interface show the wrong result.
relative file is LinkBuilderBeanDefinitionRegistrar, RepositoryRestMvcConfiguration(at spring data rest mvc 2.6.11).
I want it can order by myself, or customise it .
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading LinkBuilderBeanDefinitionRegistrar and RepositoryRestMvcConfiguration, then trace how DelegatingEntityLinks uses PluginRegistryFactoryBean and OrderAwarePluginRegistry. Compare the EntityLinks ordering behavior between the reported versions 0.23 and 0.25. Done means EntityLinks can be ordered consistently or customized so Spring Data REST exposes the correct API result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100