반응형

org.mybatis.spring.MyBatisSystemException:
nested exception is org.apache.ibatis
.exceptions.TooManyResultsException: Expected one result (or null) to be returne
d by selectOne(), but found: 3 (returnType 상 1개가 select되는데, 결과값은 3개가 나오고있다.?? )
원인: 쿼리문의 결과로 결과가 하나만 나와야하는데 두개이상의 값이 나오는 경우
해결:
1)결과 값이 하나만 나오도록 쿼리 수정
2)mapper 에서 resultType을 List<dto명>자료형으로 수정하여 두개이상의 값을 받아오도록 수정
참조 : https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=chocohigh21&logNo=220720522157
반응형
'공부 > SpringBoot & Spring' 카테고리의 다른 글
| has an unsupported return type 오류 (0) | 2022.06.17 |
|---|---|
| An error happened during template parsing 에러 (0) | 2022.06.17 |
| MyBatis 오류: Invalid bound statement (not found) (0) | 2022.06.15 |
| mybatis mapper resultMap (0) | 2022.06.14 |
| thymeleaf Exception evaluating SpringEL expression 500 오류 (0) | 2022.06.14 |