考虑使用Spring HATEOAS的这个实现。
application:
controllers:
- SomeController.php
- SomeOtherController.php
public:
- index.php
我不想使用:
@Controller
class PersonController {
@Autowired PersonRepository repository;
@RequestMapping(value = "/persons", method = RequestMethod.GET)
HttpEntity<PagedResources<Person>> persons(Pageable pageable,
PagedResourcesAssembler assembler) {
Page<Person> persons = repository.findAll(pageable);
return new ResponseEntity<>(assembler.toResources(persons), HttpStatus.OK);
}
}
因为我有另一个自定义方法返回:
repository.findAll(pageable);
从“列表”中获取“页面”需要做些什么?
由于