zoukankan      html  css  js  c++  java
  • IDEA Invalid bound statement (not found)

    第一次使用IDEA + maven + ssm 整合项目遇到的坑org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xxx.xxx.mapper.BaseDictMapper

    可能原因

    网上的常见原因截图(几个小时的时间都试了没有解决,绝望中)

    然后我就冷静的分析了一波:这些我都试过了没有解决,问题会在那呢?环境不同!!突然灵光一闪----我以前都用的myeclipse这次我用的是IDEA啊。果然被我找到了(心疼我的几个小时时间)。

    解决方法

    原因

    IDEA的maven项目中,默认源代码目录下的xml等资源文件并不会在编译的时候一块打包进classes文件夹,而是直接舍弃掉。
    如果使用的是Eclipse,Eclipse的src目录下的xml等资源文件在编译的时候会自动打包进输出到classes文件夹。

    解决方法

    在pom.xml中build节点下添加:

    
       <!--配置Maven 对resource文件 过滤 -->
              <resources>
                  <resource>
                     <directory>src/main/resources</directory>
                     <includes>
                          <include>**/*.properties</include>
                          <include>**/*.xml</include>
                      </includes>
                     <filtering>true</filtering>
                 </resource>
                 <resource>
                     <directory>src/main/java</directory>
                     <includes>
                         <include>**/*.properties</include>
                         <include>**/*.xml</include>
                     </includes>
                     <filtering>true</filtering>
                 </resource>
             </resources>
    
    
  • 相关阅读:
    vscode常用插件列表
    使用docker构建supervisor全步骤
    docker删除虚悬镜像(临时镜像文件)
    消息队列的对比
    ECharts使用:this.dom.getContext is not a function
    curl命令行请求
    工作工具清单
    《SQL优化入门》讲座总结
    初始化git库并配置自动部署
    php代码进行跨域请求处理
  • 原文地址:https://www.cnblogs.com/shaoyu/p/11477125.html
Copyright © 2011-2022 走看看