Invalid bound statement (not found): com.xx.xx
1.mapper.xml中的namespace和实际的mapper文件不一致
2.mapper接口中的方法名和mapper.xml中的id标签不一致
这个问题和上个问题解决方法一样,仔细对对嘛,这个再对不出来,面壁思过吧。
3.上两步的问题都没有,但是还是不行,可能原因就是,没有构建进去,打开target看看对应的mapper.xml文件在不在
4.pom.xml文件中配置resource,不然mapper.xml文件就会被漏掉!pom.xml的中配置了resource,bug消失了~
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>