How to use projection interfaces with pagination in Spring Data JPA?

后端 未结 6 2105
-上瘾入骨i
-上瘾入骨i 2021-02-19 10:50

I\'m trying to get a page of a partial entity (NetworkSimple) using the new feature of spring data, projections

I\'ve checked the documentation and if I request only:

6条回答
  •  隐瞒了意图╮
    2021-02-19 11:35

    The issue may come from the method name. The by keyword means that you ae filterig data by a specific property: findByName for example. Its called query creation from method name:

    http://docs.spring.io/spring-data/jpa/docs/1.10.1.RELEASE/reference/html/#repositories.query-methods.query-creation

    So try with Page findAll(Pageable pageable);

提交回复
热议问题