javaspringspring-bootspring-data-jpaspring-data

Override Pageable max page size at controller level


I need to change the max page size for an specific mapping but the only way I know to do this is changing the spring.data.web/rest.max-page-size on the properties file.

But I need to change it only for an specific endpoint without affecting others.

Is there anyway to override this parameter?


Solution

  • This answer helps me You need to delete spring.data.web/rest.max-page-size property and use @PageableLimits with params in endpoints