当前位置:首页 > springboot整合mybatis报错 Invalid bound statement (not found)

springboot整合mybatis报错 Invalid bound statement (not found)

点击次数:5102  更新日期:2019-05-19

spring boot 整合mybatis时报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxxx.xxx

mybatis的mappper.xml文件是和java文件一起放的,经检查,发现target中没有将mapper的xml文件包含进去

处理方法:在pom的build节点下加入

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



再次运行就可以了