Spring

Mybatis, Invalid bound statement (not found) 에러

DunDung 2019. 11. 5. 02:35

 

 Mapper Interface와 mapping되는 xml파일에 오타가 있는 경우

   -> 예를 들면 id와 Interface에 메소드명이 일치하지 않는 경우

 

오타를 확인해봐도 에러가 뜬다면

 

pom.xml파일에

<build> 안에

1
2
3
4
5
6
7
8
x<resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
</resources>
 

이 코드를 추가해보자!