[Spring] because "this.service" is null

sonda·2022년 8월 9일
0

에러

목록 보기
2/4

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
because "this.service" is null

원인은 다양하다.

  • mapper 가 잘못된 경우 (sql 틀리게 작성)
  • annotation을 선언하지 않은 경우
    나 같은 경우 annotation을 빼먹은 경우였다ㅜ
    service 파일에 @Service를 선언 안 함...
    어노테이션 선언해줬더니 해결됐다.

0개의 댓글