更改HATEOAS链接的默认结构

时间:2019-10-24 15:15:02

标签: spring-hateoas

如何更改Hateoas链接的默认结构:

 "first": {
    "href": "http://localhost:8081/api/offer/?page=0&size=20"
 },
 "self": {
    "href": "http://localhost:8081/api/offer/"
 },
 "next": {
    "href": "http://localhost:8081/api/offer/?page=1&size=20"
 },
 "last": {
     "href": "http://localhost:8081/api/offer/?page=2&size=20"
 }

要这样:

 {
    "href": "http://localhost:8081/api/offer/?page=0&size=20",
    "rel" : "next",
    "method": "GET"
 },

0 个答案:

没有答案