본문 바로가기
오류

java.lang.IllegalStateException: No primary or default constructor found for interface org.springframework.data.domain.Pageable

by 뇽꾸리 2022. 5. 24.
반응형

swagger 혹은 webConfig 에서 WebMvcConfigurationSupport extends로 받아 addResourceHandlers를 오버라이드 했을 때 이러면 WebAutoConfiguration이 MVC를 구성해 주지 않는다. 

파라미터로 들어온 Pageable을 자동으로 init해주는 리졸버는 PageableHandlerMethodArgumentResolver인데, WebAutoConfiguration에서 추가해 주기 때문에 WebMvcConfig를 사용하려면 따로 추가해 주어야 한다.

 

 

해결  : 나는그냥 extends WebMvcConfigurationSupport  말고 implements WebMvcConfigurer 

이거로 받았다 

반응형

댓글