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

如果项目启动后调用运行出现如下错误:

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

且项目启动时仔细观察控制台有:

Property 'mapperLocations' was not specified or no matching resources found

在pom文件中加入:
配置maven过滤即可

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

配置之后在重启项目之前最好用maven clean一下

猜你喜欢

转载自blog.csdn.net/qq_25905159/article/details/112304775