当我送样要求getUserPlaces?page=0&size=5
我得到这个错误:
未能实例[org.springframework.data.domain.Pageable]:指定的类是一个接口
我的控制器是:
@Controller
@EnableSpringDataWebSupport
public class UserController {
...
@RequestMapping(value = "/getUserPlaces", method = RequestMethod.POST)
public @ResponseBody List<PlaceDto> getUserPlaces(@RequestBody RoutePagingDto routeRequest, Pageable pageable) {
return placeService.placeToPlaceDto(userService.getUserPlaces(pageable));
}
在我的弹簧的context.xml我有他们宣称豆:
<beans:bean class="org.springframework.data.web.SortHandlerMethodArgumentResolver" />
<beans:bean class="org.springframework.data.web.PageableHandlerMethodArgumentResolver" />
什么我失踪?