- mybatis spring application getting - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
原因:
??idea中將mapper類(lèi)型是source提陶,而xml文件在發(fā)布時(shí)不會(huì)編譯咖祭,同時(shí)也不會(huì)發(fā)布到target中,導(dǎo)致項(xiàng)目運(yùn)行時(shí)找不到mapper.xml文件。
解決方案:
??在pom.xml的build中添加
<build>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*Mapper.xml</include>
</includes>
</resource>
</resources>
</build>