How can I use Specification
and Pageable
together?
personelRepository.java
@Query(\"SELECT e FROM Personel
Solve by editing personelService.java and delete findData function on personelRepository. I use springframework.data.jpa.repository.JpaRepository findAll() function and it works.
public List<PersonelEntity> filteredData (Specification<PersonelEntity> spec, Pageable pageable){
Page<PersonelEntity> pageData = personelRepository.findAll(spec,pageable);
List<PersonelEntity> filteredData = pageData.getContent();
return filteredData;
}