EPguy
[MyBatis] Invalid bound statement (not found) 본문
원인
- Mapper Location 설정을 안한 경우
- xml의 id에 오타가 있는경우
해결
1. Mapper Location 설정을 했는가?
application.properties에 mapper 위치를 설정해야합니다.
아래 속성을 추가해주세요.
mybatis.mapper-locations=classpath:mapper/*.xml
2. id에 오타가 없는가?
id 에 오타가 있는경우 에러가 발생할 수 있습니다.
<select id="findById" resultType="com.lol.duogo.auth.dto.UserDto" parameterType="java.lang.String">
SELECT * FROM tb_user WHERE id=#{id}
</select>
'개발 > Java' 카테고리의 다른 글
[FCM] FCM V1 으로 마이그레이션 (0) | 2024.09.11 |
---|---|
[Spring] Spring Security + JWT + 카카오 로그인 구현 (1) | 2023.10.05 |
JsonMappingException: No suitable constructor found for type 에러 해결법 (0) | 2023.09.26 |