Q0. 개요
스프링 프레임워크로 개발하면서 Mybatis기반의 XML파일에서 아래와 같은 에러가 발생한 적이 있다.
1. It's likely that neither a Result Type nor a Result Map was specified.
2. A query was run and no Result Maps were found for the Mapped Statement
이는 resultType 또는 resultMap이 없어서 발생된 에러이다.
Q1. 결론적으로
<select>태그를 사용할때는 나머지 update/delete/insert와는 다르게 resultType 또는 resultMap을 필히 작성해야한다. 예를 들면 다음과 같다. <select id ="selectSampleList" parameterType="hashmap" resultType="hashmap"> .... </select>
'Error 모음' 카테고리의 다른 글
[Oracle] ORA-01745 호스트/바인드 변수명이 부적합합니다 (0) | 2023.11.21 |
---|---|
[Oracle] ORA-00911 문자가 부적합합니다 (0) | 2023.11.21 |
[Oracle] ORA-00001 무결성 제약 조건에 위배됩니다 (5) | 2023.11.21 |
[Spring] 매월 말일 스프링 스케줄러 실행 (0) | 2023.11.21 |
[Java] java.net.MalformedURLException: no protocol (1) | 2023.11.21 |