【发布时间】:2019-02-20 15:43:27
【问题描述】:
我试图在我的 RestController 中实现 Pageable 并遇到了这个错误消息“No primary or default constructor found for interface org.springframework.data.domain.Pageable”的问题
我的控制器是
@GetMapping("/rest/category/all/page")
public Page<ItemCategory> getAllItemCategoryByPage(Pageable pageable){
Page<ItemCategory> categories = itemCategoryService.getAllItemCategoriesByPageable(pageable);
return categories;
}
我在这里做错了什么。它是一个 Spring Boot 2.0 应用程序。 提前致谢!
【问题讨论】:
标签: java spring-boot