Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b

最近在使用Maven+SSM整合开发分模块分布式的时候,出现了以下的错误

Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 
com.taotao.mapper.TbItemMapper.selectByExample
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)

Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b_第1张图片

原因是:在编辑的时候把mapper文件给漏掉了
Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b_第2张图片

解决方法:修改tmapper模块的pom文件
在pom文件中添加如下内容:


    <build>
        <resources>
            <resource>
                <directory>src/main/javadirectory>
                <includes>
                    <include>**/*.propertiesinclude>
                    <include>**/*.xmlinclude>
                includes>
                <filtering>falsefiltering>
            resource>
        resources>
    build>

测试OK:
Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid b_第3张图片

你可能感兴趣的:(Maven)