개발기본지식

[Mybatis] 스프링 부트 mybatis 에러 (Mapped Statements collection does not contain value for~)

개발하는소유밍 2024. 4. 1. 21:24

작업 중 console창에 나타난 에러 메시지

Mapped Statements collection does not contain value for~

 

 

내 원인은 mapper에서 연결한 xml 파일이 아닌 다른 파일에 쿼리를 작성했다.

log1Mapper에 제대로 작성 후 오류 해결

뭐랄까.. 나같은 사람 또 있겠지..?

Mapped Statements collection does not contain value

 

 

아래는 일반적으로 해결 할 수 있는 방법 기록

 

1) mapper id 확인

2) mapper 에 정의 된 name 중복이 있는지 확인

3) parameter, bean 필드명 일치하는지 확인

4) mybatis config파일에 mapper 정의가 되어있지 않은지 확인

300x250