Announcement Announcement Module
Collapse
No announcement yet.
Customizing Page links in Spring HATEOAS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Customizing Page links in Spring HATEOAS

    Hello all,
    Is there a way to customize Page links so that I can have multiple links under 'Next' and 'Previous' links using Spring HATEOAS?

    For example, I am getting the following with Spring HATEOAS for a Pageable resource:

    Code:
    "links" : [
    { "rel" : "next", "href" : "http://localhost:8080/persons?page=1&size=20 }
    ]
    ​

    Is it possible to generate the following using the api so as to provide links to specific pages and not just to first/prev/next/last pages?

    Code:
    "links": {
    "next": [ { "name": "5", "href": "/v1/entity?perPage=5&page=3" }, { "name": "6", "href": "/v1/entity?perPage=5&page=4" } ], "prev": [ { "name": "3", "href": "/v1/entity?perPage=5&page=3" }, { "name": "2", "href": "/v1/entity?perPage=5&page=4" } ... ​... ]
    }

  • #2
    This question is probably a better candidate for StackOverflow, perhaps with the "spring-hateoas" tag.

    Could you post your question there?
    The forums are moving to stackoverflow, a page explaining all this will be available there in a few days: http://spring.io/questions

    Comment

    Working...
    X