Make spring-hateoas-webmvc module compatible with spring-hateoas 1.3.4
See original GitHub issueHi,
While upgrading to spring boot 2.5.5
, I’m facing the following exception:
java.util.NoSuchElementException: null
at java.base/java.util.Arrays$ArrayItr.next(Arrays.java:4431)
at org.springframework.hateoas.server.mvc.WebMvcLinkBuilderFactory.lambda$linkTo$1(WebMvcLinkBuilderFactory.java:128)
at org.springframework.hateoas.server.core.WebHandler.lambda$linkTo$0(WebHandler.java:156)
at org.springframework.hateoas.server.core.WebHandler.linkTo(WebHandler.java:86)
at org.springframework.hateoas.server.mvc.WebMvcLinkBuilderFactory.linkTo(WebMvcLinkBuilderFactory.java:121)
at org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.java:165)
at org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo(WebMvcLinkBuilder.java:139)
at org.springframework.hateoas.server.mvc.WebMvcLinkBuilderFactory.linkTo(WebMvcLinkBuilderFactory.java:108)
at org.springframework.hateoas.server.mvc.WebMvcLinkBuilderFactory.linkTo(WebMvcLinkBuilderFactory.java:58)
at com.blazebit.persistence.spring.hateoas.webmvc.KeysetAwarePagedResourcesAssemblerArgumentResolver.resolveBaseUri(KeysetAwarePagedResourcesAssemblerArgumentResolver.java:86)
at com.blazebit.persistence.spring.hateoas.webmvc.KeysetAwarePagedResourcesAssemblerArgumentResolver.resolveArgument(KeysetAwarePagedResourcesAssemblerArgumentResolver.java:68)
at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:121)
This is probably related to a change in spring-hateoas 1.3.4
, I think introduced by https://github.com/spring-projects/spring-hateoas/issues/1589
Could you please have a look?
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Spring HATEOAS - Reference Documentation
To easily create hypermedia enriched representations, Spring HATEOAS provides a set of classes with RepresentationModel at their root.
Read more >Upgrade to Spring HATEOAS 1.3.4 · Issue #27970 - GitHub
Spring Boot. Contribute to spring-projects/spring-boot development by creating an account on GitHub.
Read more >Spring Boot HATEOAS - Representation Model and Assembler
In this spring hateoas tutorial, we learned : Important classes in spring hateoas module; What are representation models; How to create entity ...
Read more >An Intro to Spring HATEOAS - Baeldung
We can use these to create the metadata and associate it to the resource representation. 4.1. Adding Hypermedia Support to a Resource.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Happy to help! At first glance, it’s weird that you apparently don’t hand in parameter values for a target controller method that actually takes parameters. We could of course default to assume null for the ones missing but it feels like this would mask issues better solved on the call side?
Hey @odrotbohm,
thanks for the quick action and nice to hear that this is fixed in 1.4. I’ll add this “workaround” 😃