且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

更新时间:2022-08-17 14:49:22

使用SpringBoot+MyBaits组合,运行代码出现如下异常

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)


我的mapper文件放置如下

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)


需要再pom.xml中增加以下配置

<build>
    <resources>
        <!--编译src/main/java目录下的xml文件-->
        <resource>
            <directory>src/main/java</directory>
            <includes>
                <include>**/*.xml</include>
            </includes>
            <filtering>true</filtering>
        </resource>
    </resources>
</build>