I want to pagination in Spring MVC but getting error : Could not instantiate bean class [org.springframework.data.domain.Pageable]: Specified class is an interface . Anyone can help? thanks!
To resolve Pageable
parameters, Spring MVC uses a component called a HandlerMethodArgumentResolver
(reference here). Specifically for Pageable as parameter, HandlerMethodArgumentResolver used is org.springframework.data.web.PageableHandlerMethodArgumentResolver
, this can be registered using Java Configuration by just adding the @EnableSpringDataWebSupport
annotation.
More options are available here: http://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#core.web
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With