Search code examples
javaspring-bootspring-hateoasfeign

The provider is spring data rest ,client is use feign with page not work


my boot is 2.0.5 I have tried include

compile('org.springframework.boot:spring-boot-starter-hateoas')

and feign code:

@GetMapping
PagedResources<Subject> findAll();

and replace PagedResources to Resources ,don't work.

and I also want to know the client controller how set the page param. can elegance to pass the controller param to feign then to the data-rest provider.


Solution

  • Spring Data elements such as Pageable are not supported by Spring Cloud OpenFeign. See Support Spring Data Pageable in Feign Client.