Framework/myBatis
[myBatis] java.lang.IllegalArgumentException : Mapped Statements collection does not contain value
codingD
2021. 7. 27. 21:56
오류 메세지
- java.lang.IllegalArgumentException : Mapped Statements collection does not contain value ~
원인
- mapper id가 다름 : mapper 파일에 접근하는 DAO나 Service의 id 값이 일치하지 않음
- 파라미터와 빈의 필드명이 틀림
- myBatis config 파일에 mapper가 정의되어 있지 않거나 철자가 틀림
- mapper에 정의된 namespace 명칭이 같은 Application 내에 중복 됨
해결방법
- mapper id가 달라서 발생한 오류로 id 수정 진행