resultType을 입력하지 않았을 때 발생하는 오류

이태규·2022년 3월 29일
0

spring

목록 보기
22/64

There was an unexpected error (type=Internal Server Error, status=500).
###Error querying database. Cause: org.apache.ibatis.executor.ExecutorException: A query was run and no Result Maps were found for the Mapped Statement 'Member.selectMemberLogin'. It's likely that neither a Result Type nor a Result Map was specified.

<select id="selectMemberLogin"
        parameterType="com.example.dto.MemberDTO">
        SELECT M.UEMAIL, M.UNAME, M.UPHONE, M.UROLE 
        FROM MEMBER M WHERE UEMAIL=#{uemail} AND UPW=#{upw}
</select>

resultType을 설정해주지 않아서 발생하는 오류

<select id="selectMemberLogin"
        parameterType="com.example.dto.MemberDTO"
        resultType="com.example.dto.MemberDTO">
        SELECT M.UEMAIL, M.UNAME, M.UPHONE, M.UROLE 
        FROM MEMBER M WHERE UEMAIL=#{uemail} AND UPW=#{upw}
</select>

다음과 같이 수정해서 해결

profile
한 걸음씩 나아가자

0개의 댓글