Spring Data Page Without Pageable
ID |
java.spring_data_page_without_pageable |
Severity |
low |
Remediation Complexity |
trivial |
Remediation Risk |
low |
Remediation Effort |
low |
Resource |
Reliability |
Language |
Java |
Tags |
best-practice, spring |
Description
Reports Spring Data repository methods that return Page<T> but do not have a Pageable parameter. Spring Data requires a Pageable argument to construct paged query results; omitting it causes a runtime exception.
Rationale
Reliability — The query method will fail at runtime with an IllegalArgumentException because Spring Data cannot determine the page size and offset.