spring-projects / spring-projects/spring-hateoas
Request params sometimes missing in links
@odrotbohm is already working on this.
Since Jun 4, 2025.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
Using HAL+json with spring-hateoas v2.2.5 in an app using Springboot v 3.2.X
For links generated like this
@Component
class MyResourceProcessor() : RepresentationModelProcessor<EntityModel<SomeEntity>> {
//...
linkTo(
methodOn(MyController::class.java)
.getMyEntity(
somePathVariable = valueOfPathVariable,
someQueryParam = valueOfQueryParam
)
).withRel(SOME_RELATION)
the generated href sent to frontend does not contain any request param
In the object generated at the end of the above code, href is alright. But it has lost its query params by the time the response is sent back to the client.
The path variables are ok.
Now for the weirdest part : it is not happening consistently!
For the same version of my webapp (same commit), on the same deployment environment, the bug may or may not appear.
When it does appear, it is appearing consistently : alls links generated like this always lose their query params.
I never reproduced it on localhost.
Have you ever seen anything like this?
Any path I could investigate?
Thanks
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.
Assessment
This issue has not been assessed yet.