Skip to content

Spring data Jpa extension : sort with Pageable does not work #5406

@MossabTN

Description

@MossabTN

When I use the extension of spring data Jpa, the sort with Pageable does not work.

This is my exp:

@GET
    @Produces("application/json")
    public List<Fruit> findAll() {
        return fruitRepository.findAll(PageRequest.of(0,3, Sort.by(Sort.Direction.DESC, "id"))).getContent();
    }

the method sort does not work as if it does not exist

Metadata

Metadata

Assignees

Labels

area/springIssues relating to the Spring integrationkind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions