Spring MVC errors: failed to instantiate bean class [org.springframework.data.domain.Pageable]: the specified class is an interface

I want to paginate pages on Spring MVC, but I get the error: Failed to instantiate bean class [org.springframework.data.domain.Pageable]: the specified class is an interface. Can anybody help? thanks!

+6
source share
1 answer

To enable Pageable options, Spring MVC uses a component called HandlerMethodArgumentResolver (link here ). In particular, for the Pageable parameter, HandlerMethodArgumentResolver org.springframework.data.web.PageableHandlerMethodArgumentResolver used as the parameter, this can be registered using the Java configuration by simply adding the @EnableSpringDataWebSupport annotation.

Additional options are available here: http://docs.spring.io/spring-data/data-commons/docs/current/reference/html/#core.web

+8
source

Source: https://habr.com/ru/post/973022/


All Articles