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>
    
    
  • 相关阅读:
    多态的详解
    Java继承详解
    static关键字特点
    数组(相关知识的整理)
    杨辉三角(用for循环)
    Jmeter接口测试案例实践(一)
    组合测试方法:配对测试实践
    用例设计方法:判定表驱动法实践
    sso系统登录以及jsonp原理
    单点登录--sso系统
  • 原文地址:https://www.cnblogs.com/shaoyu/p/11477125.html
Copyright © 2011-2022 走看看