• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

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

开发技术 开发技术 2周前 (04-08) 4次浏览

多模块,在使用mybatis-plus时,找不到其他模块的xml 报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 错误

发现target下mapper包中的xml文件夹没有被编译,在父工程里的pom文件中<build></build>标签添加如下内容

<resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.yml</include>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>

 


喜欢 (0)