프로젝트/에러 정리(Error)
[Error]request processing failed nested exception is org.mybatis.spring.mybatissystemexception
jmaster
2022. 3. 29. 00:45
1.문제 정의
- 클라이언트에서 호출시 500에러가 발생하였다.
request processing failed nested exception is org.mybatis.spring.mybatissystemexception
- 에러 메시지를 보니 mapper.xml 파일 resultMap을 찾을 수 없다 라고 적혀 있었다.
- 이를 해결하기 Mapper.xml 에서 보니 id가 selectStor인 select문에 resultMap값이 없었다.
2.해결방법
- select에 resultMap을 추가하여 return값을 넘겨주면 된다.
3.결과
- 오타와 실수를 줄이기 위해 코드를 작성한 후 한번 더 확인하는 습관을 기르자!