I use Spring Data Rest 2.1.1 Release with the default configuration. Considering the following resource:
GET /communities/MyCommunity
{
"creationDate": "2014-07-16T06:22:37.153+0000",
"name": "GroupeSEB",
"_links": {
"self": {
"href": "http://localhost:8080/api/communities/GroupeSEB"
},
"posts": {
"href": "http://localhost:8080/api/communities/GroupeSEB/posts"
}
}
}
When I get the "posts" sub-resource :
GET /communities/MyCommunity/posts
{
"_embedded": {
"posts": [
{
"creationDate": "2014-07-09T13:09:14.535+0000",
"id": "53bd3efae4b012818368c549",
"_links": {
"self": {
"href": "http://localhost:8080/api/posts/53bd3efae4b012818368c549"
}
}
}
]
}
}
No pagination is enabled. Since My parent resource can aggregate a large amount of posts (its sub-resource), how can I enable pagination for every sub-resources ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…