美文网首页
找不到mapper映射文件异常:Invalid bound st

找不到mapper映射文件异常:Invalid bound st

作者: mili_8ea3 | 来源:发表于2019-05-04 15:14 被阅读0次

今天做项目的时候报错Invalid bound statement (not found),这种情况是找不到mapper映射文件,打开编译后的文件发现mapper里面只有接口而没有xml文件,这种情况是xml被过滤掉了,只需要在pom.xml添加如下代码就可以解决该异常。

    <build>
    <resources>
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.xml</include>
            </includes>
            <filtering>false</filtering>
        </resource>
    </resources>
    </build>

相关文章

网友评论

      本文标题:找不到mapper映射文件异常:Invalid bound st

      本文链接:https://www.haomeiwen.com/subject/rewxoqtx.html