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>
    
    
  • 相关阅读:
    [置顶] 算法设计基础
    .net 多线程学习
    如何获得Repeater中的列
    npoi导出excel
    字符串的格式化问题
    用线程修改页面中的值(一)
    正则表达式的验证数值验证
    .net 线程更新页面中的值(方法二)
    .net 线程更新页面中的值(方法一)
    字符串的分割
  • 原文地址:https://www.cnblogs.com/shaoyu/p/11477125.html
Copyright © 2011-2022 走看看