When practicing spring data JPA, use the paging interface pageable to query data. After the interface is implemented, run and report an error:
Paging query needs to have a Pageable parameter! Offending method public abstract
Implementation code summary:
import org.springframework.data.domain.Page;
import java.awt.print.Pageable
...
@Service
public class AyUserServiceImpl implements AyUserService {
@Resource
private AyUserRepository ayUserRepository;
...
@Override
public Page<AyUser> findAll(Pageable pageable){
return ayUserRepository.findAll(pageable);
}
}
Later, it was found that the package name of pageable was wrong and changed to
import org.springframework.data.domain.Pageable;
It works normally
Similar Posts:
- [Solved] Hits[] of ElasticSearch SearchResponse is always one less record than totalHits
- [Solved] org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type
- PHP: How to Solve Laravel rules preg_match(): No ending delimiter ‘/’ found
- [Solved] remote calling three-party interface error: javax.net.ssl.SSLHandshakeException
- [Five Method to Solve] android webpage err_unknown_url_scheme
- Solving the problem of nginx reverse proxy web service soap:address location problem
- How to Solve pandas_datareader & get_data_yahoo cannot Read Datas
- How to Solve JAVA @override error
- [Solved] NoSuchMethodError: org.springframework.boot.web.servlet.error.ErrorController.getErrorPath
- Springboot about the error report of findone() method in springdatajpa