I am writing a GET request (using Angular 10, Spring boot, & Postgres). It does a 'Get' request to fetch 3357 records from a database. Then, it renders it to the UI
return this.http.get<IFileMetadata[]>(this.resourceUrl, { params: options, observe: 'response' });
The problem is that it only shows 2000 records in the UI, which is not correct, as it should be 3357 records.
Is there any limit for the number of rows that can be returned in a 'Get' request?
CodePudding user response:
As an user suggested in his comment, the limit of 2000 records is due to the fact that spring fixes a default 2000 limit per_page stored in the properties spring.data.web.pageable.max-page-size
and spring.data.rest.max-page-size
property for the maximum size of pages both documented here, so you can add the spring.data.web.pageable.max-page-size= newvalue
inside the spring boot application.properties to override the default value or an equivalent method or change the pageable maximum size for spring.data.rest.max-page-size
in the same way.