zoukankan      html  css  js  c++  java
  • Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample问题解决

    最近在做一个关于ssm框架整合的项目,但是今天正合完后出现了问题:

     Invalid bound statement (not found): com.taotao.mapper.TbItemMapper.selectByExample

    表示找不到mapper映射文件(xml)

    解决办法:

      方法一、在mapper工程下的pom文件中加入下面的内容,让mapper映射文件加载到target的classes中去

    <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 -->

          <build>

                <resources>

                <resource>

                    <directory>src/main/java</directory>

                    <includes>

                        <include>**/*.properties</include>

                        <include>**/*.xml</include>

                    </includes>

                    <filtering>false</filtering>

                </resource>

            </resources>

          </build>

    如果pom文件中已经有build标签,只是把resources标签内部的内容拷贝进去,而build标签就不用了

    若是没有就全部加进去

       方法二、如果还是没有解决,问题可能出现在扫描mapper.xml文件的配置上:

             不妨试着修改如下:

              修改前:

             

              修改后:

            

  • 相关阅读:
    RT-Thread代码启动过程与$Sub$ $main、$Super$ $main
    软件开源许可证
    git回退到历史版本以及再滚回去
    GMT、UTC、UNIX时间戳、时区
    sprintf的使用
    C# Json 和对象的相互转换
    获取指定年份/月份的周六周天 + 标记指定日期(加粗)
    Winform 窗体实现圆角展示
    VS2012统计代码量
    C# Winform 中使用FTP实现软件自动更新功能
  • 原文地址:https://www.cnblogs.com/rgever/p/9360314.html
Copyright © 2011-2022 走看看