首页 > Web开发 > 详细

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

时间:2019-02-17 21:12:53      阅读:168      评论:0      收藏:0      [点我收藏+]

技术分享图片

原因: 此异常的原因是由于mapper接口编译后在同一个目录下没有找到mapper映射文件而出现的。由于maven工程在默认情况下src/main/java目录下的mapper文件是不发布到target目录下的。

 

解决方法

  在dao的pom.xml中添加如下内容:

<!-- 如果不添加此节点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>

 

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

原文:https://www.cnblogs.com/yft-javaNotes/p/10392589.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!