0
我正在写Spring Boot REST服务器。Spring Boot Paging not working
这是我TripController.java
@RequestMapping(path = "/", method = RequestMethod.GET)
public GenericResponse<List<Trip>> getUserTrips(@RequestParam("owner") String owner) {
Pageable pageRequest = createPageRequest();
List<Trip> trips = tripRepository.findByOwner(owner , pageRequest);
return new GenericResponse<List<Trip>>(200, "Success", trips);
}
private Pageable createPageRequest()
return new PageRequest(0, 10);
}
在编译时,测试阶段我得到这个错误:
org.apache.maven.lifecycle.LifecycleExecutionException:未能执行目标org.apache .maven.plugins:maven-surefire-plugin:2.18.1:项目演示测试(默认测试):测试失败。
完整的错误报告是在这里:https://pastebin.com/s4u5RX51