MyBatis

[자바,mybatis] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

xemaker 2018. 10. 24. 14:14

심각: Servlet.service() for servlet [action] in context with path [] threw exception 

[Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx] with root cause 

org.apache.ibatis.binding.BindingException:

Invalid bound statement (not found):


정신없이 코딩하다면 위와 같은 에러가 발생한다.


나같은 경우는 매퍼에는 만들어 놨는데 mybatis 쿼리를 다른데다 만들어놔서 발생한 에러였다..


즉, mybatis xml 상단에 보면


<mapper namespace="com.xxx.AAMapper">


이 있는데 이 AAMapper.java 인터페이스에 선언을 해 두고


sql을 다른 xml 파일에다 만들어서 난 에러였다.


다시 <mapper namespace="com.xxx.AAMapper">


선언한 xml에 sql 을 만들어서 해결했다.